@font-face {
    font-family: "AuraPic Main";
    src:
        url("assets/ITC-Bauhaus-Medium.woff2") format("woff2"),
        url("assets/ITC-Bauhaus-Medium.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "AuraPic Secondary";
    src:
        url("assets/CreatoDisplay-Regular.woff2") format("woff2"),
        url("assets/CreatoDisplay-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "AuraPic Secondary";
    src:
        url("assets/CreatoDisplay-Bold.woff2") format("woff2"),
        url("assets/CreatoDisplay-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "AuraPic Fallback Sans";
    src: url("assets/DejaVuSans.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "AuraPic Fallback Sans";
    src: url("assets/DejaVuSans-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "AuraPic Fallback Serif";
    src: url("assets/DejaVuSerif.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --ink: #202033;
    --muted: #6e6b80;
    --paper: #ffffff;
    --soft: #f4f0ff;
    --line: #e7e1f2;
    --accent: #7c3aed;
    --accent-text: #7c3aed;
    --accent-contrast: #ffffff;
    --focus-color: #7c3aed;
    --progress-selected-color: #d6d9dd;
    --shadow: 0 24px 70px rgba(45, 31, 75, 0.13);
    --font-main: "AuraPic Main", "AuraPic Fallback Serif", Georgia, serif;
    --font-secondary: "AuraPic Secondary", "AuraPic Fallback Sans", Arial, sans-serif;
    font-family: var(--font-secondary);
    color: var(--ink);
    background: #f8f6fc;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 10% 4%, rgba(255, 174, 138, 0.25), transparent 28rem),
        radial-gradient(circle at 92% 24%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 32rem),
        linear-gradient(145deg, #fbfaff 0%, #f4f0fb 100%);
}

html.content-document,
body.content-page {
    background: #fff;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

.site-header {
    width: min(1120px, calc(100% - 40px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #242035;
    font-family: var(--font-main);
    font-size: 1.18rem;
    font-weight: 400;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: none;
}

.content-page .site-header {
    justify-content: flex-start;
}

.content-page .brand {
    flex: 0 0 auto;
    gap: clamp(9px, 1vw, 12px);
    font-size: clamp(1.625rem, min(2.25vw, 3.2dvh), 1.875rem);
    line-height: 0.95;
}

.content-page .brand-logo {
    width: clamp(42px, 6dvh, 56px);
    height: clamp(42px, 6dvh, 56px);
    filter: none;
}

.header-note,
.site-footer {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 400;
}

.page-shell {
    width: min(820px, calc(100% - 32px));
    min-height: calc(100vh - 150px);
    margin: 12px auto 28px;
    display: grid;
    place-items: center;
}

.quiz-card {
    width: 100%;
    min-height: 700px;
    padding: 32px 38px 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.content-page .content-card {
    border: 0;
    box-shadow: none;
}

.science-section {
    margin-top: 24px;
    line-height: 1.7;
}

.science-section h2,
.science-section h3 {
    font-family: var(--font-main);
    font-weight: 400;
    line-height: 1.25;
}

.science-section h3 {
    margin: 28px 0 12px;
    font-size: 1.3rem;
    overflow-wrap: anywhere;
}

.science-section p,
.science-section .legal-list {
    margin: 12px 0;
}

.science-section summary {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.science-section summary:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 4px;
}

.quiz-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.progress-track {
    height: 7px;
    margin-top: 12px;
    overflow: hidden;
    background: #f4f5f6;
    border-radius: 100px;
}

.progress-fill {
    height: 100%;
    display: block;
    background: linear-gradient(90deg, #eceef0 0%, #d6d9dd 76.9231%, var(--progress-selected-color) 100%);
    background-position: left center;
    background-repeat: no-repeat;
    background-size: var(--progress-gradient-width, 100%) 100%;
    border-radius: inherit;
    transition: width 260ms ease;
}

.quiz-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 38px 0 28px;
}

.stage-heading {
    max-width: 640px;
    margin: 0 auto 28px;
    text-align: center;
}

.trait-stage-heading {
    margin-bottom: 22px;
}

.trait-prompt {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
}

h1,
h2 {
    font-family: var(--font-main);
    font-weight: 400;
}

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    color: #211d31;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
}

h1:focus {
    outline: none;
}

.stage-copy {
    max-width: 520px;
    margin: 14px auto 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.option-grid {
    width: min(710px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.option-card {
    min-width: 0;
    min-height: 132px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #d1d5db;
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.option-card:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #8b929b;
    background: #f8f9fa;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
}

.option-card:active:not(:disabled) {
    border-color: #6b7280;
    background: #e5e7eb;
}

.option-card.is-selected,
.option-card[aria-checked="true"] {
    border-color: #4b5563;
    background: #f3f4f6;
    box-shadow: 0 0 0 3px rgba(75, 85, 99, 0.22);
}

.option-card:focus-visible {
    outline: 3px solid #4b5563;
    outline-offset: 3px;
}

.option-card:disabled {
    cursor: default;
}

.option-illustration {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: block;
    object-fit: contain;
    user-select: none;
}

.option-label {
    max-width: 100%;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.quiz-footer {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.text-button {
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
}

.text-button:hover {
    color: var(--ink);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.cp-picker {
    width: min(420px, 100%);
    margin: 0 auto;
    display: grid;
    justify-items: center;
    gap: 13px;
    text-align: center;
}

.cp-wheel-wrap {
    position: relative;
    width: clamp(218px, min(68vw, 42vh), 320px);
    width: clamp(218px, min(68vw, 42dvh), 320px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 0 1px rgba(42, 31, 66, 0.1),
        0 18px 38px rgba(43, 31, 68, 0.17),
        0 0 0 7px rgba(255, 255, 255, 0.82);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: box-shadow 160ms ease;
}

.cp-wheel {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 50%;
    background: #fff;
    cursor: crosshair;
    outline: none;
    touch-action: none;
}

.cp-wheel:focus-visible {
    outline: 4px solid var(--focus-color);
    outline-offset: 8px;
}

.cp-wheel-wrap:focus-within {
    box-shadow:
        0 0 0 1px rgba(42, 31, 66, 0.1),
        0 18px 38px rgba(43, 31, 68, 0.17),
        0 0 0 7px rgba(255, 255, 255, 0.92);
}

.cp-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 20px;
    height: 20px;
    display: block;
    border: 3px solid #fff;
    border-radius: 50%;
    background: transparent;
    box-shadow:
        0 0 0 2px rgba(20, 17, 29, 0.65),
        0 3px 9px rgba(20, 17, 29, 0.32);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.cp-marker[hidden] {
    display: none;
}

.cp-readout {
    width: min(320px, 100%);
    min-height: 56px;
    padding: 6px 14px 6px 8px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    border: 0;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(43, 31, 68, 0.08);
    text-align: left;
}

.cp-swatch {
    width: 44px;
    height: 44px;
    border: 3px solid #fff;
    border-radius: 12px;
    background: var(--accent);
    box-shadow:
        0 0 0 1px rgba(35, 30, 49, 0.16),
        0 5px 12px rgba(35, 30, 49, 0.16);
}

.cp-name {
    min-width: 0;
    max-width: 100%;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-name.is-empty {
    color: var(--muted);
    font-weight: 400;
}

.color-next-action {
    width: min(320px, 100%);
    min-height: 52px;
    margin-top: 1px;
}

.color-next-action:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

.primary-button {
    min-height: 52px;
    padding: 13px 22px;
    border: 0;
    border-radius: 14px;
    background: var(--ink);
    color: white;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(32, 32, 51, 0.16);
    transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(32, 32, 51, 0.2);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.color-next-action .primary-button:disabled {
    cursor: not-allowed;
}

.name-form {
    width: min(480px, 100%);
    margin: 0 auto;
}

.field-label + .field-label {
    margin-top: 16px;
}

.field-label {
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 700;
}

.text-input {
    width: 100%;
    height: 58px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: white;
    color: var(--ink);
    font-size: 1.06rem;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: var(--focus-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus-color) 14%, transparent);
}

.text-input::placeholder {
    color: #aaa5b5;
}

.text-input[aria-invalid="true"] {
    border-color: #b42318;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.aurapic-phone-widget {
    --iti-border-color: var(--line);
    --iti-country-selector-bg: #ffffff;
    --iti-hover-color: #f3f4f6;
    --iti-icon-color: #667085;
    --iti-spacer-horizontal: 13px;
    width: 100%;
    display: block;
    color: var(--ink);
    font-family: inherit;
}

.aurapic-phone-widget .iti__tel-input.text-input {
    width: 100%;
    min-width: 0;
    background: #ffffff;
}

.aurapic-phone-widget .iti__country-container {
    border-radius: 15px 0 0 15px;
}

.aurapic-phone-widget .iti__country-container::after {
    position: absolute;
    top: 10px;
    right: 0;
    bottom: 10px;
    width: 1px;
    background: var(--line);
    content: '';
    pointer-events: none;
}

.aurapic-phone-widget .iti__selected-country,
.aurapic-phone-widget .iti__selected-country-primary {
    border-radius: 14px 0 0 14px;
}

.aurapic-phone-widget .iti__selected-country-primary {
    min-width: 94px;
    justify-content: center;
    transition: background-color 150ms ease;
}

.aurapic-phone-widget .iti__selected-country:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: -3px;
}

.aurapic-phone-widget .iti__selected-dial-code {
    color: #344054;
    font-size: 0.98rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.aurapic-phone-widget:focus-within .text-input {
    border-color: var(--focus-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus-color) 14%, transparent);
}

.aurapic-phone-widget:has(.text-input[aria-invalid="true"]) .iti__country-container::after {
    background: #b42318;
}

.aurapic-phone-country-layer {
    --iti-border-color: #e4e7ec;
    --iti-country-selector-bg: #ffffff;
    --iti-hover-color: #f4f6f8;
    --iti-icon-color: #667085;
    --iti-spacer-horizontal: 16px;
    color: var(--ink);
    font-family: var(--font-secondary);
}

.aurapic-phone-country-layer .iti__country-selector {
    width: min(430px, calc(100vw - 24px));
    max-height: min(470px, calc(100dvh - 28px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(17, 24, 39, 0.22), 0 4px 14px rgba(17, 24, 39, 0.1);
}

.aurapic-phone-country-layer .iti__search-input-wrapper {
    flex: 0 0 auto;
    border-bottom-color: #eaecf0;
    background: #ffffff;
}

.aurapic-phone-country-layer .iti__search-input {
    height: 54px;
    border: 0;
    border-radius: 16px 16px 0 0;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-size: 0.96rem;
    outline: none;
}

.aurapic-phone-country-layer .iti__search-input::placeholder {
    color: #98a2b3;
}

.aurapic-phone-country-layer .iti__search-input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus-color) 55%, transparent);
    outline-offset: -3px;
}

.aurapic-phone-country-layer .iti__search-clear {
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
}

.aurapic-phone-country-layer .iti__country-list {
    min-height: 0;
    max-height: 350px;
    flex: 1 1 auto;
    overscroll-behavior: contain;
    scrollbar-color: #c9ced6 transparent;
    scrollbar-width: thin;
}

.aurapic-phone-country-layer .iti__country {
    min-height: 52px;
    gap: 2px;
    border-bottom: 1px solid #f2f4f7;
    color: #202939;
    font-size: 0.94rem;
    line-height: 1.3;
    transition: background-color 120ms ease;
}

.aurapic-phone-country-layer .iti__country:last-child {
    border-bottom: 0;
}

.aurapic-phone-country-layer .iti__country.iti__highlight {
    background: #f2f4f7;
}

.aurapic-phone-country-layer .iti__country[aria-selected="true"] {
    background: color-mix(in srgb, var(--focus-color) 9%, #ffffff);
    color: #17202e;
    font-weight: 700;
}

.aurapic-phone-country-layer .iti__dial-code {
    margin-left: 12px;
    color: #7d8797;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.aurapic-phone-country-layer .iti__country-check {
    color: var(--focus-color);
}

.aurapic-phone-country-layer .iti__no-results {
    color: var(--muted);
    font-size: 0.92rem;
}

.field-help {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.45;
}

.phone-stage .field-help {
    margin: 9px 2px 0;
    text-align: center;
}

@media (max-width: 700px), (max-height: 600px) and (pointer: coarse) {
    .aurapic-phone-country-layer.iti--fullscreen-popup {
        inset: 0;
        padding: max(12px, env(safe-area-inset-top)) 0 0;
        align-items: stretch;
        justify-content: flex-end;
        background: rgba(17, 24, 39, 0.52);
        backdrop-filter: blur(2px);
    }

    .aurapic-phone-country-layer.iti--fullscreen-popup .iti__country-selector {
        width: 100%;
        max-height: min(78dvh, 680px);
        margin-top: auto;
        padding-bottom: env(safe-area-inset-bottom);
        border-width: 1px 0 0;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -16px 46px rgba(17, 24, 39, 0.2);
    }

    .aurapic-phone-country-layer.iti--fullscreen-popup .iti__search-input {
        min-height: 58px;
        border-radius: 24px 24px 0 0;
        font-size: 1rem;
    }

    .aurapic-phone-country-layer.iti--fullscreen-popup .iti__country-list {
        max-height: none;
    }

    .aurapic-phone-country-layer.iti--fullscreen-popup .iti__country {
        min-height: 56px;
        padding-inline: 18px;
        font-size: 0.98rem;
    }
}

.large-button {
    width: 100%;
    min-height: 58px;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #ff8065));
    color: var(--accent-contrast);
}

.form-error {
    min-height: 22px;
    margin: 8px 2px 0;
    color: #b42318;
    font-size: 0.82rem;
    line-height: 1.4;
}

.form-error[hidden] {
    display: block;
    visibility: hidden;
}

.submit-status {
    min-height: 20px;
    margin: 5px 2px 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}

.share-delivery-note {
    margin: 9px 2px 0;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
}

.button-spinner {
    width: 16px;
    height: 16px;
    margin-right: 9px;
    display: inline-block;
    vertical-align: -3px;
    color: inherit;
    border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.loading-state,
.empty-state {
    flex: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    text-align: center;
}

.loading-state p {
    margin: 0;
    color: var(--muted);
}

.mini-orb,
.empty-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb36f, #8b68ef);
    box-shadow: 0 12px 30px rgba(117, 78, 205, 0.25);
    color: white;
    font-size: 1.5rem;
    animation: breathe 1.7s ease-in-out infinite;
}

.empty-state h1 {
    max-width: 540px;
}

.notice-card {
    width: min(680px, calc(100% - 32px));
    margin: 24px auto;
    padding: 18px;
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow);
    text-align: center;
}

.site-footer {
    width: min(1120px, calc(100% - 32px));
    min-height: 58px;
    margin: 0 auto;
    padding: 4px 0 18px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    text-align: center;
}

.footer-history {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.2;
}

.footer-links,
.site-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.footer-links a,
.site-links a {
    color: var(--muted);
    font-weight: 400;
    text-decoration: none;
}

.enter {
    animation: enter 260ms ease both;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

/* Result page */
html.result-document,
body.result-body {
    background: #fff;
}

.result-page {
    width: min(920px, calc(100% - 32px));
    min-height: calc(100vh - 58px);
    margin: 0 auto;
    padding: 20px 0 44px;
}

.result-wrap {
    width: 100%;
    min-width: 0;
}

.result-nav {
    width: min(760px, 100%);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(10px, 1.35vw, 18px);
}

.result-nav .brand {
    flex: 0 0 auto;
    gap: clamp(10px, 1.5vw, 14px);
    font-size: clamp(1.625rem, 3.3vw, 1.875rem);
    line-height: 0.95;
}

.result-nav .brand-logo {
    width: clamp(54px, 7vw, 60px);
    height: clamp(54px, 7vw, 60px);
}

.result-card {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 6vw, 62px);
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid white;
    border-radius: 34px;
    box-shadow: var(--shadow);
}

.result-card-poster-first {
    min-width: 0;
    overflow: visible;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.result-card-poster-first::before {
    display: none;
}

.result-card::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    top: -190px;
    right: -120px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.14;
    filter: blur(4px);
}

.result-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 126px;
    align-items: center;
    gap: 28px;
}

.result-title {
    max-width: 620px;
    margin: 0;
    color: #211d31;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
}

.type-code {
    margin: 20px 0 0;
    display: inline-flex;
    padding: 8px 12px;
    background: color-mix(in srgb, var(--accent) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent-text) 25%, white);
    border-radius: 100px;
    color: var(--accent-text);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.result-orb-wrap {
    position: relative;
    display: grid;
    place-items: center;
}

.result-orb {
    width: 116px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 31% 25%, rgba(255, 255, 255, 0.92), transparent 17%),
        radial-gradient(circle at 65% 72%, color-mix(in srgb, var(--accent) 40%, #ff9277), transparent 48%),
        var(--accent);
    box-shadow: 0 25px 60px color-mix(in srgb, var(--accent) 35%, transparent), inset -22px -30px 45px rgba(40, 24, 72, 0.2);
}

.hero-match-art {
    width: 76%;
    height: 76%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(40, 24, 72, 0.22));
}

.result-grid {
    position: relative;
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.result-summary {
    position: relative;
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.ocean-profile {
    position: relative;
    margin-top: 28px;
    padding: 20px;
    background: #f7f5fa;
    border: 1px solid var(--line);
    border-radius: 17px;
}

.ocean-profile-title {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-secondary);
    font-size: 1.08rem;
    font-weight: 700;
}

.ocean-profile-scale {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.ocean-score-list {
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
    list-style: none;
}

.ocean-score-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ocean-score-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.9rem;
    font-weight: 700;
}

.ocean-score-letter {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
    border-radius: 50%;
    color: var(--accent-text);
    font-size: 0.78rem;
    line-height: 1;
}

.ocean-score-value {
    flex: 0 0 auto;
    color: var(--accent-text);
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.ocean-score-meter {
    width: 100%;
    height: 11px;
    margin-top: 9px;
    display: block;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: color-mix(in srgb, var(--accent) 8%, #ece8f2);
    border: 0;
    border-radius: 100px;
    color: var(--accent);
}

.ocean-score-meter::-webkit-meter-bar {
    background: color-mix(in srgb, var(--accent) 8%, #ece8f2);
    border: 0;
    border-radius: 100px;
    box-shadow: none;
}

.ocean-score-meter::-webkit-meter-optimum-value,
.ocean-score-meter::-webkit-meter-suboptimum-value,
.ocean-score-meter::-webkit-meter-even-less-good-value {
    background: var(--accent);
    border-radius: 100px;
}

.ocean-score-meter::-moz-meter-bar {
    background: var(--accent);
    border: 0;
    border-radius: 100px;
}

.result-detail {
    min-width: 0;
    padding: 18px;
    background: #f7f5fa;
    border: 1px solid var(--line);
    border-radius: 17px;
}

.detail-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.detail-value {
    display: block;
    font-size: 1.08rem;
    font-weight: 700;
}

.detail-reason {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.match-art {
    width: 88px;
    height: 88px;
    margin: 0 0 14px;
    display: block;
    object-fit: contain;
    border-radius: 20px;
    filter: drop-shadow(0 9px 12px rgba(46, 31, 73, 0.12));
}

.match-copy {
    min-width: 0;
}

.match-name,
.match-why {
    display: block;
}

.match-name {
    font-family: var(--font-main);
    font-weight: 400;
}

.match-why {
    margin-top: 5px;
    color: var(--accent-text);
    font-size: 0.9rem;
    font-weight: 700;
}

.match-copy > :first-child {
    margin-top: 0;
}

.match-copy > :last-child {
    margin-bottom: 0;
}

.trait-list {
    position: relative;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
}

.chosen-traits {
    position: relative;
    margin-top: 28px;
}

.chosen-traits-title {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    font-family: var(--font-secondary);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.trait-pill {
    padding: 9px 13px;
    background: color-mix(in srgb, var(--accent) 9%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, white);
    border-radius: 100px;
    font-size: 0.84rem;
    font-weight: 700;
}

.share-section {
    position: relative;
    margin-top: 14px;
}

.share-card-preview {
    width: min(100%, 760px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 0;
    background: var(--accent);
    box-shadow: none;
    isolation: isolate;
}

.result-poster {
    width: min(100%, 760px, max(440px, calc(100svh - 232px)));
    box-shadow:
        0 0 clamp(24px, 5vw, 48px) 6px color-mix(in srgb, var(--accent) 40%, transparent),
        0 0 clamp(48px, 10vw, 96px) 12px color-mix(in srgb, var(--accent) 20%, transparent);
}

.share-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
    background: var(--accent);
}

.result-poster-image {
    user-select: none;
    -webkit-user-drag: none;
}

.result-poster-failure[hidden],
.result-actions [hidden] {
    display: none;
}

.result-poster-failure {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    padding: clamp(28px, 8vw, 72px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96) 0 7%, transparent 32%),
        radial-gradient(circle at 17% 20%, rgba(92, 226, 255, 0.52), transparent 35%),
        radial-gradient(circle at 84% 76%, rgba(255, 127, 193, 0.46), transparent 38%),
        linear-gradient(145deg, color-mix(in srgb, var(--accent) 28%, #161329), #f8f5ff 50%, color-mix(in srgb, var(--accent) 45%, #f87f9e));
    text-align: center;
}

.result-poster-failure::before,
.result-poster-failure::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.56);
    border-radius: 50%;
    pointer-events: none;
}

.result-poster-failure::before {
    width: 72%;
    aspect-ratio: 1;
    box-shadow: 0 0 80px color-mix(in srgb, var(--accent) 34%, transparent);
}

.result-poster-failure::after {
    width: 48%;
    aspect-ratio: 1;
    opacity: 0.7;
}

.result-poster-failure-copy {
    max-width: 520px;
    margin: 0;
    color: #211d31;
    font-family: var(--font-main);
    font-size: clamp(1.35rem, 4vw, 2.35rem);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.result-poster-retry {
    min-width: 154px;
    border-color: #211d31;
    background: #211d31;
    color: #fff;
    box-shadow: 0 12px 28px rgba(33, 29, 49, 0.2);
}

.result-poster-retry:disabled {
    cursor: wait;
}

.legal-list {
    margin: 20px 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
    line-height: 1.7;
}

.legal-list li + li {
    margin-top: 9px;
}

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

.result-actions-secondary {
    margin-top: 9px;
    order: 3;
}

.result-actions-primary {
    margin-top: 16px;
    order: 2;
}

.result-share-tools.is-poster-unavailable .result-actions {
    grid-template-columns: minmax(0, 1fr);
}

.share-networks {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    order: 4;
}

.result-share-tools {
    width: min(760px, 100%);
    margin: 16px auto 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 38px rgba(45, 31, 75, 0.09);
    backdrop-filter: blur(14px);
}

.result-share-heading {
    margin: 0;
    order: 1;
    color: var(--ink);
    font-size: clamp(2rem, 5.2vw, 3rem);
    line-height: 1;
    letter-spacing: -0.035em;
    text-align: center;
    text-wrap: balance;
}

.action-button,
.secondary-link {
    min-height: 48px;
    padding: 12px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: white;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.result-actions .action-button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    gap: 8px;
}

.action-button-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 18px;
    pointer-events: none;
}

.action-button-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.result-actions .action-button.action-button-primary {
    min-height: 56px;
    border-color: var(--ink);
    background: var(--ink);
    color: white;
    font-size: 0.94rem;
}

.action-button:disabled {
    cursor: progress;
    opacity: 0.72;
    transform: none;
}

.share-network-link {
    min-width: 0;
    min-height: 48px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: color-mix(in srgb, var(--accent) 5%, white);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.share-network-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 18px;
    pointer-events: none;
}

.share-network-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.share-network-link:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    background: color-mix(in srgb, var(--accent) 9%, white);
    color: var(--accent-text);
}

.action-button:hover:not(:disabled),
.secondary-link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 8px 20px rgba(40, 30, 65, 0.09);
}

.result-create-cta {
    width: min(760px, 100%);
    min-height: 56px;
    margin: 10px auto 0;
    padding: 12px 18px;
    display: grid;
    place-items: center;
    gap: 3px;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--accent) 9%, white);
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.result-create-cta:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
    background: color-mix(in srgb, var(--accent) 13%, white);
    box-shadow: 0 10px 26px rgba(45, 31, 75, 0.09);
}

.result-create-cta-title {
    color: var(--accent-text);
    font-size: 1rem;
    font-weight: 700;
}

.result-status {
    width: min(760px, 100%);
    min-height: 20px;
    margin: 8px auto 0;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

.result-status:empty {
    min-height: 0;
    margin-top: 0;
}

.result-explanation {
    width: min(760px, 100%);
    margin: 12px auto 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(45, 31, 75, 0.06);
    backdrop-filter: blur(14px);
}

.result-explanation-toggle {
    min-height: 54px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
    list-style: none;
    transition: color 150ms ease, background 150ms ease;
}

.result-explanation-toggle::-webkit-details-marker {
    display: none;
}

.result-explanation-toggle::after {
    content: "";
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
}

.result-explanation[open] > .result-explanation-toggle::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.result-explanation-toggle:hover {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
    color: var(--ink);
}

.result-explanation-toggle:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: -3px;
}

.result-explanation-content {
    padding: clamp(22px, 4vw, 36px);
    border-top: 1px solid var(--line);
}

@keyframes enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes breathe {
    50% { transform: scale(1.06); }
}

@media (max-width: 700px) {
    .site-header {
        width: min(100% - 28px, 1120px);
        height: 66px;
    }

    .header-note {
        display: none;
    }

    .page-shell {
        width: min(100% - 20px, 820px);
        min-height: calc(100vh - 112px);
        margin-top: 0;
    }

    .quiz-card {
        min-height: min(690px, calc(100vh - 86px));
        min-height: min(690px, calc(100dvh - 86px));
        padding: 24px 18px 18px;
        border-radius: 24px;
    }

    .quiz-stage {
        padding: 28px 0 22px;
    }

    .stage-heading {
        margin-bottom: 23px;
    }

    .option-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .option-card {
        min-height: 112px;
        padding: 9px 5px;
        border-radius: 15px;
    }

    .option-illustration {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .option-label {
        font-size: 0.74rem;
    }

    .cp-picker {
        gap: 11px;
    }

    .cp-readout {
        width: min(310px, 100%);
    }

    .site-footer {
        width: min(100% - 28px, 1120px);
        padding-top: 12px;
    }

    .result-page {
        width: min(calc(100% - 16px), 920px);
        min-height: calc(100vh - 58px);
        padding: 8px 0 26px;
    }

    .result-nav {
        width: calc(100% - 8px);
        margin-bottom: 10px;
    }

    .result-nav .secondary-link {
        min-height: 42px;
        padding: 9px 13px;
    }

    .result-card.result-card-poster-first {
        padding: 0;
        border-radius: 0;
    }

    .result-poster {
        width: 100%;
    }

    .result-share-tools {
        margin-top: 10px;
        padding: 15px 12px;
        border-radius: 18px;
    }

    .result-hero {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .result-orb {
        width: min(112px, 34vw);
    }

    .result-grid {
        margin-top: 24px;
        grid-template-columns: 1fr;
    }

    .result-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .result-actions .action-button {
        padding-inline: 8px;
        font-size: 0.82rem;
    }

    .result-actions .action-button.action-button-primary {
        min-height: 52px;
        font-size: 0.88rem;
    }

    .share-networks {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-status {
        margin-top: 6px;
    }

    .result-create-cta {
        min-height: 68px;
        padding: 13px 12px;
        border-radius: 16px;
    }

    .result-explanation {
        margin-top: 10px;
        border-radius: 16px;
    }

    .result-explanation-toggle {
        min-height: 52px;
        padding: 13px 15px;
    }

    .result-explanation-content {
        padding: 20px 16px;
    }

    .result-title {
        font-size: clamp(1.9rem, 10vw, 2.8rem);
    }

    .result-summary {
        margin-top: 18px;
        font-size: 0.98rem;
    }

    .ocean-profile {
        padding: 17px 15px;
    }

    .ocean-score-heading {
        gap: 10px;
    }

    .match-art {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 360px) {
    .site-header {
        width: calc(100% - 20px);
    }

    .page-shell {
        width: calc(100% - 12px);
    }

    .result-page {
        width: calc(100% - 8px);
    }

    .result-nav {
        width: calc(100% - 8px);
    }

    .result-explanation-content {
        padding-inline: 14px;
    }

    .quiz-card {
        padding-inline: 10px;
        border-radius: 20px;
    }

    .quiz-stage {
        padding-block: 22px 18px;
    }

    .cp-picker {
        gap: 9px;
    }

    .cp-wheel-wrap {
        width: min(226px, calc(100vw - 80px));
    }

    .cp-readout {
        min-height: 52px;
        padding: 4px 11px 4px 6px;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 9px;
    }

    .cp-name {
        font-size: 0.86rem;
    }

    .option-grid {
        gap: 5px;
    }

    .option-card {
        min-height: 105px;
        padding-inline: 3px;
    }

    .option-illustration {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .option-label {
        font-size: 0.69rem;
        line-height: 1.18;
    }

    .quiz-top {
        gap: 8px;
        font-size: 0.68rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cp-wheel-wrap,
    .cp-wheel,
    .cp-marker,
    .cp-readout,
    .color-next-action {
        transition: none !important;
    }
}

/* Protected admin dashboard */
.admin-body {
    min-height: 100vh;
    background: #f5f6f7;
    color: #202124;
    font-family: var(--font-secondary);
}

.admin-body,
.admin-body * {
    text-align: left;
}

.admin-body a {
    color: #34373c;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.admin-body a:hover {
    color: #000000;
}

.admin-body :focus-visible {
    outline: 3px solid #555b63;
    outline-offset: 3px;
}

.admin-skip-link {
    position: fixed;
    z-index: 20;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #111111;
    color: #ffffff !important;
    transform: translateY(-160%);
}

.admin-skip-link:focus {
    transform: translateY(0);
}

.admin-header {
    width: 100%;
    min-height: 78px;
    padding: 12px max(20px, calc((100% - 1440px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #dfe1e4;
    background: #ffffff;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #17181a !important;
    text-decoration: none;
}

.admin-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.admin-brand span {
    display: grid;
    gap: 1px;
}

.admin-brand strong {
    font-family: var(--font-main);
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 0.95;
}

.admin-brand small {
    color: #6a6d72;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-logout {
    margin: 0;
}

.admin-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 64px;
}

.admin-page-heading {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.admin-page-heading h1,
.admin-login-card h1 {
    margin: 3px 0 8px;
    color: #17181a;
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
}

.admin-page-heading p,
.admin-login-card p,
.admin-panel-heading p {
    margin: 0;
    color: #62666c;
    line-height: 1.5;
}

.admin-eyebrow {
    color: #74787f !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.admin-login-card {
    width: min(480px, 100%);
    margin: clamp(28px, 8vh, 90px) auto 0;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid #dfe1e4;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(33, 36, 41, 0.08);
}

.admin-login-form {
    margin-top: 24px;
    display: grid;
    gap: 9px;
}

.admin-login-form label {
    margin-top: 7px;
    color: #34373c;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-login-form input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #b8bcc2;
    border-radius: 9px;
    background: #ffffff;
    color: #17181a;
}

.admin-login-form input:focus {
    border-color: #4d5259;
}

.admin-button,
.admin-detail-link,
.admin-pagination a {
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #222529;
    border-radius: 9px;
    background: #222529;
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    cursor: pointer;
}

.admin-button:hover,
.admin-detail-link:hover,
.admin-pagination a:hover {
    background: #000000;
}

.admin-button-secondary {
    border-color: #c7cacf;
    background: #ffffff;
    color: #292c30 !important;
}

.admin-button-secondary:hover {
    border-color: #777c83;
    background: #f2f3f4;
}

.admin-alert {
    margin: 18px 0 0 !important;
    padding: 12px 14px;
    border: 1px solid #aeb2b8;
    border-radius: 9px;
    background: #f0f1f2;
    color: #202124 !important;
    font-weight: 700;
}

.admin-metrics {
    margin: 0 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.admin-metric {
    min-height: 118px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #dfe1e4;
    border-radius: 12px;
    background: #ffffff;
}

.admin-metric dt {
    color: #666a70;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-metric dd {
    margin: 12px 0 0;
    color: #17181a;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.admin-panel {
    margin-bottom: 20px;
    padding: clamp(18px, 2.5vw, 28px);
    border: 1px solid #dfe1e4;
    border-radius: 14px;
    background: #ffffff;
}

.admin-panel h2 {
    margin: 0 0 14px;
    color: #202124;
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-panel-heading {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.admin-panel-heading h2 {
    margin-bottom: 4px;
}

.admin-panel-heading > span {
    flex: 0 0 auto;
    color: #6b6f75;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e3e6;
    border-radius: 10px;
}

.admin-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.82rem;
}

.admin-table caption {
    padding: 10px 12px;
    color: #666a70;
    font-size: 0.76rem;
    caption-side: bottom;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7e9;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.admin-table th {
    background: #f3f4f5;
    color: #4b4f55;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover td {
    background: #f8f9fa;
}

.admin-table small {
    color: #6d7177;
}

.admin-detail-link {
    min-height: 38px;
    padding: 8px 11px;
    white-space: nowrap;
}

.admin-pagination {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.admin-pagination span {
    color: #5e6268;
    font-weight: 700;
}

.admin-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-activity-grid .admin-panel {
    margin-bottom: 0;
}

.admin-table-wrap-compact .admin-table {
    min-width: 0;
}

.admin-detail-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid #e1e3e6;
    border-radius: 10px;
    background: #e1e3e6;
}

.admin-detail-grid > div {
    min-width: 0;
    padding: 13px 14px;
    background: #ffffff;
}

.admin-detail-grid dt {
    margin-bottom: 5px;
    color: #6d7177;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.admin-detail-grid dd {
    margin: 0;
    color: #25282c;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.admin-json-grid {
    display: grid;
    gap: 12px;
}

.admin-json-detail {
    overflow: hidden;
    border: 1px solid #dfe1e4;
    border-radius: 10px;
    background: #f8f9fa;
}

.admin-json-detail summary {
    min-height: 44px;
    padding: 12px 14px;
    color: #303338;
    font-weight: 700;
    cursor: pointer;
}

.admin-json {
    width: 100%;
    max-height: 620px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    border-top: 1px solid #dfe1e4;
    background: #151719;
    color: #f1f2f3;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.76rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 760px) {
    .admin-header {
        min-height: 68px;
        padding: 9px 16px;
    }

    .admin-brand img {
        width: 44px;
        height: 44px;
    }

    .admin-brand strong {
        font-size: 1.45rem;
    }

    .admin-shell {
        width: min(100% - 20px, 1440px);
        padding-top: 24px;
    }

    .admin-page-heading,
    .admin-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-activity-grid {
        grid-template-columns: 1fr;
    }

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 440px) {
    .admin-brand small {
        display: none;
    }

    .admin-login-card {
        padding: 22px 18px;
    }

    .admin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metric {
        min-height: 100px;
        padding: 14px;
    }
}

/* Home and create flow */
html.quiz-document {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #fff;
}

body.quiz-page {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    display: grid;
    grid-template-rows: clamp(48px, 8dvh, 66px) minmax(0, 1fr) clamp(32px, 5dvh, 40px);
    background: #fff;
}

.quiz-page .site-header {
    width: min(1120px, calc(100% - 20px));
    height: 100%;
    min-height: 0;
    justify-content: flex-start;
    gap: clamp(10px, 1.35vw, 18px);
}

.quiz-page .brand {
    flex: 0 0 auto;
    gap: clamp(9px, 1vw, 12px);
    font-size: clamp(1.625rem, min(2.25vw, 3.2dvh), 1.875rem);
    line-height: 0.95;
}

.quiz-page .brand-logo {
    width: clamp(42px, 6dvh, 56px);
    height: clamp(42px, 6dvh, 56px);
    filter: none;
}

.quiz-page .page-shell {
    width: min(820px, calc(100% - 20px));
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: clamp(4px, 1dvh, 8px) 0;
    place-items: center;
    overflow: hidden;
}

.quiz-page .quiz-card {
    width: 100%;
    height: 100%;
    max-height: 700px;
    min-height: 0;
    padding: clamp(10px, 2dvh, 18px) clamp(10px, 3vw, 32px);
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.quiz-page .quiz-top {
    gap: 8px;
    font-size: clamp(0.66rem, 1.5dvh, 0.78rem);
}

.quiz-page .progress-track {
    height: clamp(4px, 0.8dvh, 7px);
    margin-top: clamp(4px, 1dvh, 10px);
}

.quiz-page .quiz-stage {
    min-height: 0;
    padding: clamp(7px, 1.8dvh, 18px) 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.quiz-page .quiz-stage::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.quiz-page .trait-stage.enter {
    animation: none;
    transform: none;
}

.quiz-page .quiz-layout-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.quiz-page .quiz-footer {
    min-height: clamp(22px, 3.5dvh, 30px);
}

.quiz-page .site-footer {
    width: min(1120px, calc(100% - 20px));
    height: 100%;
    min-height: 0;
    padding: 0;
    align-items: center;
    align-content: center;
    row-gap: 2px;
    font-size: clamp(0.68rem, 1.45dvh, 0.8rem);
    line-height: 1.1;
}

.quiz-page .header-note {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 15rem;
    overflow: hidden;
    font-size: clamp(0.68rem, 1.4dvh, 0.84rem);
    line-height: 1.15;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-page .footer-links {
    gap: 4px 12px;
}

.quiz-page .footer-history {
    font-size: clamp(0.64rem, 2.8vw, 0.75rem);
    line-height: 1.2;
    white-space: normal;
}

.quiz-page .stage-heading {
    margin-bottom: clamp(7px, 1.7dvh, 20px);
}

.quiz-page h1 {
    font-size: clamp(1.5rem, min(5vw, 5dvh), 3rem);
    line-height: 1.02;
}

.quiz-page .trait-prompt {
    font-size: clamp(1.35rem, min(5vw, 4.8dvh), 2.6rem);
}

.quiz-page .stage-copy {
    margin-top: clamp(5px, 1dvh, 12px);
    font-size: clamp(0.76rem, 1.8dvh, 1rem);
    line-height: 1.35;
}

.quiz-page .trait-stage-heading {
    flex: 0 0 auto;
    margin-bottom: clamp(6px, 1.4dvh, 16px);
}

.quiz-page .option-grid {
    flex: 1 1 0;
    min-height: 0;
    max-height: 420px;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: clamp(5px, 0.9dvh, 10px);
}

.quiz-page .option-card {
    min-height: 0;
    padding: clamp(2px, 0.45dvh, 5px) 4px;
    gap: clamp(2px, 0.5dvh, 5px);
    border-radius: clamp(12px, 2dvh, 17px);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.quiz-page .option-card:hover {
    transform: none;
}

.quiz-page .option-illustration {
    width: clamp(52px, min(22vw, 12dvh), 104px);
    height: clamp(52px, min(22vw, 12dvh), 104px);
    max-width: 100%;
    min-height: 0;
    flex: 0 1 auto;
    transform-origin: center center;
    transition: transform 180ms ease-out;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .quiz-page .option-card:hover:not(:disabled) .option-illustration {
        transform: scale(1.08);
    }
}

.quiz-page .option-label {
    font-size: clamp(0.78rem, min(3.4vw, 2.1dvh), 1.05rem);
    line-height: 1.15;
}

.quiz-page .color-stage {
    padding-block: 0;
}

.quiz-page .form-stage {
    padding-inline: 8px;
}

.quiz-page .color-stage .stage-heading,
.quiz-page .form-stage .stage-heading {
    margin-bottom: clamp(4px, 0.8dvh, 10px);
}

.quiz-page .cp-picker {
    gap: clamp(4px, 1dvh, 10px);
}

.quiz-page .cp-wheel-wrap {
    width: clamp(180px, min(72vw, 44dvh), 420px);
}

.quiz-page .cp-readout {
    min-height: clamp(42px, 6dvh, 54px);
    padding: 4px 10px 4px 6px;
    grid-template-columns: clamp(34px, 5dvh, 42px) minmax(0, 1fr);
    gap: 8px;
}

.quiz-page .cp-swatch {
    width: clamp(34px, 5dvh, 42px);
    height: clamp(34px, 5dvh, 42px);
}

.quiz-page .color-next-action {
    min-height: 0;
    margin-inline-start: auto;
    display: grid;
    justify-items: end;
}

.quiz-page .primary-button {
    min-height: clamp(44px, 6dvh, 52px);
    padding-block: clamp(9px, 1.6dvh, 13px);
}

.quiz-page .field-label {
    gap: clamp(4px, 1dvh, 9px);
}

.quiz-page .text-input {
    height: clamp(46px, 7dvh, 56px);
}

.quiz-page .large-button {
    min-height: clamp(44px, 7dvh, 56px);
    margin-top: clamp(5px, 1.3dvh, 10px);
}

.quiz-page .form-error,
.quiz-page .submit-status {
    font-size: clamp(0.7rem, 1.4dvh, 0.82rem);
    line-height: 1.3;
}

.quiz-page .form-error:empty,
.quiz-page .submit-status:empty {
    min-height: 0;
    margin: 0;
}

.quiz-page .field-help,
.quiz-page .share-delivery-note {
    font-size: clamp(0.66rem, 1.3dvh, 0.76rem);
    line-height: 1.3;
}

.quiz-page .phone-stage .field-help {
    margin-top: clamp(3px, 0.7dvh, 7px);
}

.quiz-page .share-delivery-note {
    margin-top: clamp(4px, 1dvh, 8px);
}

@supports not (height: 1dvh) {
    .content-page .brand {
        font-size: clamp(1.625rem, min(2.25vw, 3.2vh), 1.875rem);
    }

    .content-page .brand-logo {
        width: clamp(42px, 6vh, 56px);
        height: clamp(42px, 6vh, 56px);
    }

    body.quiz-page {
        grid-template-rows: clamp(48px, 8vh, 66px) minmax(0, 1fr) clamp(32px, 5vh, 40px);
    }

    .quiz-page .brand {
        font-size: clamp(1.625rem, min(2.25vw, 3.2vh), 1.875rem);
    }

    .quiz-page .brand-logo {
        width: clamp(42px, 6vh, 56px);
        height: clamp(42px, 6vh, 56px);
    }

    .quiz-page .page-shell {
        padding-block: clamp(4px, 1vh, 8px);
    }

    .quiz-page .quiz-card {
        padding: clamp(10px, 2vh, 18px) clamp(10px, 3vw, 32px);
    }

    .quiz-page .quiz-top {
        font-size: clamp(0.66rem, 1.5vh, 0.78rem);
    }

    .quiz-page .progress-track {
        height: clamp(4px, 0.8vh, 7px);
        margin-top: clamp(4px, 1vh, 10px);
    }

    .quiz-page .quiz-stage {
        padding-block: clamp(7px, 1.8vh, 18px);
    }

    .quiz-page .quiz-footer {
        min-height: clamp(22px, 3.5vh, 30px);
    }

    .quiz-page .site-footer {
        font-size: clamp(0.68rem, 1.45vh, 0.8rem);
    }

    .quiz-page .header-note {
        font-size: clamp(0.68rem, 1.4vh, 0.84rem);
    }

    .quiz-page .stage-heading {
        margin-bottom: clamp(7px, 1.7vh, 20px);
    }

    .quiz-page h1 {
        font-size: clamp(1.5rem, min(5vw, 5vh), 3rem);
    }

    .quiz-page .trait-prompt {
        font-size: clamp(1.35rem, min(5vw, 4.8vh), 2.6rem);
    }

    .quiz-page .stage-copy {
        margin-top: clamp(5px, 1vh, 12px);
        font-size: clamp(0.76rem, 1.8vh, 1rem);
    }

    .quiz-page .trait-stage-heading {
        margin-bottom: clamp(6px, 1.4vh, 16px);
    }

    .quiz-page .option-grid {
        gap: clamp(5px, 0.9vh, 10px);
    }

    .quiz-page .option-card {
        padding-block: clamp(2px, 0.45vh, 5px);
        gap: clamp(2px, 0.5vh, 5px);
        border-radius: clamp(12px, 2vh, 17px);
    }

    .quiz-page .option-illustration {
        width: clamp(52px, min(22vw, 12vh), 104px);
        height: clamp(52px, min(22vw, 12vh), 104px);
    }

    .quiz-page .option-label {
        font-size: clamp(0.78rem, min(3.4vw, 2.1vh), 1.05rem);
    }

    .quiz-page .color-stage {
        padding-block: 0;
    }

    .quiz-page .color-stage .stage-heading,
    .quiz-page .form-stage .stage-heading {
        margin-bottom: clamp(4px, 0.8vh, 10px);
    }

    .quiz-page .cp-picker {
        gap: clamp(4px, 1vh, 10px);
    }

    .quiz-page .cp-wheel-wrap {
        width: clamp(180px, min(72vw, 44vh), 420px);
    }

    .quiz-page .cp-readout {
        min-height: clamp(42px, 6vh, 54px);
        grid-template-columns: clamp(34px, 5vh, 42px) minmax(0, 1fr);
    }

    .quiz-page .cp-swatch {
        width: clamp(34px, 5vh, 42px);
        height: clamp(34px, 5vh, 42px);
    }

    .quiz-page .primary-button {
        min-height: clamp(44px, 6vh, 52px);
        padding-block: clamp(9px, 1.6vh, 13px);
    }

    .quiz-page .field-label {
        gap: clamp(4px, 1vh, 9px);
    }

    .quiz-page .text-input {
        height: clamp(46px, 7vh, 56px);
    }

    .quiz-page .large-button {
        min-height: clamp(44px, 7vh, 56px);
        margin-top: clamp(5px, 1.3vh, 10px);
    }

    .quiz-page .form-error,
    .quiz-page .submit-status {
        font-size: clamp(0.7rem, 1.4vh, 0.82rem);
    }

    .quiz-page .field-help,
    .quiz-page .share-delivery-note {
        font-size: clamp(0.66rem, 1.3vh, 0.76rem);
    }

    .quiz-page .share-delivery-note {
        margin-top: clamp(4px, 1vh, 8px);
    }
}

@media (min-width: 900px) and (min-height: 720px) {
    .quiz-page .quiz-card {
        max-height: 860px;
    }

    .quiz-page .option-grid {
        max-height: 600px;
    }

    .quiz-page .option-illustration {
        width: clamp(80px, 12vh, 128px);
        height: clamp(80px, 12vh, 128px);
    }
}

.quiz-page #quiz-app > noscript {
    width: 100%;
    flex: 1;
    display: grid;
    place-items: center;
}

.quiz-page #quiz-app > noscript .notice-card {
    margin: 0 auto;
    border: 1px solid var(--line);
    box-shadow: none;
}

@media (max-height: 640px) {
    body.quiz-page {
        grid-template-rows: 46px minmax(0, 1fr) 28px;
    }

    .quiz-page .page-shell {
        padding-block: 4px;
    }

    .quiz-page .quiz-card {
        padding-block: 8px;
    }

    .quiz-page .quiz-stage {
        padding-block: 6px;
    }

    .quiz-page .cp-wheel-wrap {
        width: clamp(120px, min(60vw, 28vh), 168px);
        width: clamp(120px, min(60vw, 28dvh), 168px);
    }

    .quiz-page .cp-picker {
        gap: 4px;
    }

    .quiz-page .phone-stage .field-help,
    .quiz-page .share-delivery-note {
        line-height: 1.2;
    }
}

@media (max-height: 520px) and (min-width: 560px) {
    body.quiz-page {
        grid-template-rows: 42px minmax(0, 1fr) 28px;
    }

    .quiz-page .site-header {
        width: min(1120px, calc(100% - 16px));
    }

    .quiz-page .brand {
        gap: 6px;
        font-size: 1rem;
    }

    .quiz-page .brand-logo {
        width: 30px;
        height: 30px;
    }

    .quiz-page .header-note {
        font-size: 0.68rem;
    }

    .quiz-page .page-shell {
        padding-block: 3px;
    }

    .quiz-page .quiz-card {
        padding: 6px 12px;
    }

    .quiz-page .quiz-top {
        font-size: 0.62rem;
    }

    .quiz-page .progress-track {
        height: 4px;
        margin-top: 3px;
    }

    .quiz-page .quiz-stage {
        padding-block: 3px;
    }

    .quiz-page .quiz-footer {
        min-height: 20px;
    }

    .quiz-page .site-footer {
        font-size: 0.62rem;
    }

    .quiz-page h1,
    .quiz-page .trait-prompt {
        font-size: 1.3rem;
        line-height: 1;
    }

    .quiz-page .stage-copy {
        display: none;
    }

    .quiz-page .stage-heading,
    .quiz-page .trait-stage-heading {
        margin-bottom: 4px;
    }

    .quiz-page .option-grid {
        max-height: none;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }

    .quiz-page .option-card {
        padding: 2px 3px;
        gap: 2px;
        border-radius: 10px;
    }

    .quiz-page .option-illustration {
        width: clamp(34px, 10vh, 52px);
        width: clamp(34px, 10dvh, 52px);
        height: clamp(34px, 10vh, 52px);
        height: clamp(34px, 10dvh, 52px);
    }

    .quiz-page .option-label {
        font-size: 0.75rem;
        line-height: 1.05;
    }

    .quiz-page .color-stage {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(116px, 132px);
        grid-template-rows: auto minmax(0, 1fr);
        align-items: center;
        gap: 3px 12px;
    }

    .quiz-page .color-stage .stage-heading {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
        text-align: left;
    }

    .quiz-page .color-stage .cp-picker {
        width: 100%;
        grid-column: 1;
        grid-row: 2;
        display: grid;
        grid-template-columns: clamp(82px, 32vh, 112px) minmax(0, 1fr);
        grid-template-columns: clamp(82px, 32dvh, 112px) minmax(0, 1fr);
        grid-template-rows: auto auto;
        justify-items: stretch;
        align-items: center;
        gap: 3px 8px;
        text-align: left;
    }

    .quiz-page .color-stage .cp-wheel-wrap {
        width: clamp(82px, 32vh, 112px);
        width: clamp(82px, 32dvh, 112px);
        grid-column: 1;
        grid-row: 1 / span 2;
        justify-self: center;
    }

    .quiz-page .color-stage .cp-readout {
        width: 100%;
        min-height: 38px;
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .quiz-page .color-stage .cp-swatch {
        width: 30px;
        height: 30px;
    }

    .quiz-page .color-stage .color-next-action {
        width: 100%;
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .quiz-page .color-stage .primary-button {
        width: 100%;
        min-height: 40px;
        padding: 7px 8px;
        font-size: 0.72rem;
    }

    .quiz-page .form-stage {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
        align-items: center;
        gap: 12px;
    }

    .quiz-page .form-stage .stage-heading {
        margin: 0;
        text-align: left;
    }

    .quiz-page .form-stage .name-form {
        width: 100%;
    }

    .quiz-page .field-label {
        gap: 3px;
        font-size: 0.68rem;
    }

    .quiz-page .text-input {
        height: 42px;
        font-size: 1rem;
    }

    .quiz-page .large-button {
        min-height: 42px;
        margin-top: 4px;
        padding: 7px 10px;
    }

    .quiz-page .form-error,
    .quiz-page .submit-status {
        margin-top: 2px;
        font-size: 0.66rem;
        line-height: 1.15;
    }
}

@media (max-height: 560px) and (max-width: 559px) {
    body.quiz-page {
        grid-template-rows: 40px minmax(0, 1fr) 28px;
    }

    .quiz-page .site-header {
        width: calc(100% - 16px);
    }

    .quiz-page .brand {
        gap: 5px;
        font-size: 0.96rem;
    }

    .quiz-page .brand-logo {
        width: 30px;
        height: 30px;
    }

    .quiz-page .header-note {
        display: none;
    }

    .quiz-page .page-shell {
        width: calc(100% - 12px);
        padding-block: 2px;
    }

    .quiz-page .quiz-card {
        padding: 6px 8px;
    }

    .quiz-page .quiz-top {
        font-size: 0.6rem;
    }

    .quiz-page .progress-track {
        height: 4px;
        margin-top: 3px;
    }

    .quiz-page .quiz-stage {
        padding-block: 4px;
    }

    .quiz-page .quiz-footer {
        min-height: 20px;
    }

    .quiz-page .site-footer {
        display: flex;
        font-size: 0.58rem;
    }

    .quiz-page .footer-links {
        gap: 2px 8px;
    }

    .quiz-page .stage-copy {
        display: none;
    }

    .quiz-page .stage-heading,
    .quiz-page .trait-stage-heading,
    .quiz-page .color-stage .stage-heading,
    .quiz-page .form-stage .stage-heading {
        margin-bottom: 4px;
    }

    .quiz-page h1,
    .quiz-page .trait-prompt {
        font-size: 1.2rem;
        line-height: 1;
    }

    .quiz-page .option-grid {
        max-height: none;
        gap: 4px;
    }

    .quiz-page .option-card {
        padding: 2px 3px;
        gap: 2px;
        border-radius: 9px;
    }

    .quiz-page .option-illustration {
        width: clamp(32px, 12vh, 64px);
        width: clamp(32px, 12dvh, 64px);
        height: clamp(32px, 12vh, 64px);
        height: clamp(32px, 12dvh, 64px);
    }

    .quiz-page .option-label {
        font-size: 0.74rem;
        line-height: 1.05;
    }

    .quiz-page .cp-picker {
        gap: 3px;
    }

    .quiz-page .cp-wheel-wrap {
        width: 102px;
    }

    .quiz-page .cp-readout {
        width: min(270px, 100%);
        min-height: 38px;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .quiz-page .cp-swatch {
        width: 30px;
        height: 30px;
    }

    .quiz-page .primary-button {
        min-height: 40px;
        padding-block: 7px;
    }

    .quiz-page .field-label {
        gap: 3px;
        font-size: 0.68rem;
    }

    .quiz-page .text-input {
        height: 42px;
        font-size: 1rem;
    }

    .quiz-page .large-button {
        min-height: 40px;
        margin-top: 4px;
    }

    .quiz-page .form-error,
    .quiz-page .submit-status {
        margin-top: 2px;
        font-size: 0.64rem;
        line-height: 1.15;
    }
}

@media (max-height: 380px) and (max-width: 559px) {
    body.quiz-page {
        grid-template-rows: 0 minmax(0, 1fr) 28px;
    }

    .quiz-page .site-header {
        display: none;
    }
}

@media (max-width: 360px) {
    .result-actions .action-button {
        gap: 6px;
    }

    .action-button-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .share-network-link {
        gap: 6px;
    }

    .share-network-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }
}
