/* Landing: two side-by-side route panels on wide screens. */
.landing-screen {
    width: min(100%, var(--content-width));
    /* height: calc(100svh - 100px); */
    overflow: hidden;
    margin: auto;
    padding: 0 4vw 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: clamp(16px, 3vw, 45px);
}

.landing-route {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* height: inherit; */
}

.landing-headline {
    grid-column: 1 / -1;
    text-align: center;
    /* margin: 0 0 24px; */
}

.landing-headline h1 {
    max-width: 800px;
    margin: 0 auto 25px;
    font-family: var(--font-display);
    font-size: clamp(30px, 2.8vw, 58px);
    line-height: 1.08;
}

.landing-art, .landing-art-wrap {
    width: min(96%, 600px);
}

.landing-art-quiz {
    aspect-ratio: 1.8 / 1;
    margin: 2px 0 8px;
}

.landing-art-vote {
    /* aspect-ratio: 1.9 / 1; */
    margin: clamp(20px, 5vw, 20px) 0 8px;
}

.landing-lead {
    margin: 1px 0 8px;
    font-size: clamp(14px, 1.1vw, 22px);
    line-height: 1.25;
}

.landing-copy {
    min-height: 3em;
    margin: 0 auto 10px;
    font-size: clamp(14px, 1.1vw, 22px);
    line-height: 1.23;
}

.landing-vote .landing-copy {
    margin-top: 10px;
}

.landing-route .btn {
    margin-top: 6px;
}

/* Quiz question screens. */
.quiz-screen {
    width: min(100%, var(--content-width));
    height: calc(100svh - min(125px, 11vh));
    overflow: hidden;
    margin: auto;
    padding: 10px clamp(12px, 20vw, 270px) 20px;
    display: flex;
    flex-direction: column;
}

.progress-track {
    width: min(100%, 1120px);
    height: 8px;
    margin: 0 auto 8px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(8px, 2vw, 40px);
}

.progress-segment {
    display: block;
    height: 2px;
    border-radius: 99px;
    background: #e5d1aa;
}

.progress-segment.is-active {
    background: var(--orange);
}

.quiz-art-wrap {
    width: min(95%, 650px);
    height: clamp(120px, 26vh, 330px);
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quiz-art {
    width: 100%;
    height: 100%;
}

.quiz-heading {
    text-align: left;
}

.quiz-heading .eyebrow {
    font-size: clamp(8px, 2.5vw, 16px);
}

.quiz-heading h1 {
    margin: 4px auto 10px;
    max-width: 1000px;
    font-family: var(--font-body);
    font-size: clamp(22px, 2.2vw, 40px);
    font-weight: 800;
    line-height: 1.12;
}

.quiz-heading > p:last-child {
    margin: -8px auto 16px;
    color: var(--muted);
}

.answer-grid {
    width: min(100%, 1120px);
    margin-top: 10px;
    /* margin: auto auto 6px; */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 2vw, 24px);
    column-gap: clamp(8px, 3vw, 50px);
    margin-left: auto;
    margin-right: auto;
}

.answer-card {
    min-height: clamp(55px, 6vh, 80px);
    padding: 10px clamp(12px, 2vw, 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-radius: 16px;
    color: var(--text-purple);
    background: var(--orange);
    text-align: left;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.answer-card:hover {
    transform: translateY(-2px);
}

.answer-card.is-selected {
    color: white;
    background: var(--purple);
}

.answer-copy strong {
    display: block;
    font-size: clamp(13px, 1.2vw, 22px);
    font-weight: 550;
    line-height: 1;
}

.answer-copy small {
    display: block;
    margin-top: 0;
    font-size: clamp(10px, 0.9vw, 15px);
}

.answer-radio {
    width: clamp(24px, 2.8vw, 40px);
    height: clamp(24px, 2.8vw, 40px);
    flex: 0 0 auto;
    border: 2px solid var(--purple);
    border-radius: 50%;
}

.is-selected .answer-radio {
    border-color: var(--orange);
    border-width: 4px;
}

.quiz-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 55px auto 0;
}

.quiz-controls .btn {
    min-width: 170px;
}

/* Pick & Vote. */
.vote-screen {
    width: min(100%, var(--content-width));
    height: calc(100svh - 100px);
    overflow: hidden;
    margin: auto;
    padding: 10px clamp(12px, 4vw, 40px) 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.vote-heading {
    text-align: center;
}

.vote-heading h1 {
    margin: 4px auto 35px;
    max-width: 700px;
    font-family: var(--font-display);
    font-size: clamp(28px, 7vw, 40px);
    font-weight: 900;
    line-height: 1.12;
}

.flavour-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.4vw, 24px);
}

.flavour-card {
    aspect-ratio: 1/1;
    position: relative;
    min-height: clamp(140px, 24svh, 200px);
    padding: 20px 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 46px;
    color: var(--text-purple);
    background: var(--orange);
    text-align: center;
}

.flavour-card.is-selected {
    color: #fff;
    background: var(--purple);
    /* box-shadow: 0 0 0 5px var(--cream), 0 0 0 8px var(--purple); */
}

.flavour-card-title {
    position: relative;
    z-index: 1;
    font-size: clamp(12px, 1.5vw, 28px);
    font-weight: 500;
}

.flavour-card-subtitle {
    position: relative;
    z-index: 1;
    font-size: clamp(10px, 1vw, 20px);
}

.flavour-art {
    width: 100%;
    height: clamp(100px, 24svh, 250px);
    margin-top: auto;
    object-fit: contain;
    object-position: bottom center;
    padding: 0 16%;
}

.vote-controls {
    display: flex;
    justify-content: center;
    margin-top: clamp(14px, 4vh, 40px);
}

.vote-controls .btn {
    min-width: 230px;
}

/* Result page: responsive portrait card / landscape split. */
.result-screen {
    width: min(100%, 1250px);
    height: calc(100svh - 160px);
    overflow: hidden;
    margin: auto;
    /* padding: 10px clamp(12px, 4vw, 40px) 24px; */
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    align-items: start;
    gap: clamp(14px, 3vw, 30px);
}

.result-character-panel {
    text-align: center;
    margin-left: -20px;
    margin-right: -20px;
}

.result-character-panel h1 {
    margin: 6px 0 0;
    color: var(--brown);
    font-family: var(--font-display);
    font-size: clamp(32px, 6vw, 56px);
    line-height: .98;
}

small.result-subtitle {
    font-size: clamp(9px, 2.6vw, 20px);
    font-weight: 800;
    display: block;
}

.result-screen[data-profile="refreshed"] .result-character-panel h1, .share-page[data-profile="refreshed"] .share-hero h1,
.result-screen[data-profile="refreshed"] .result-tagline, .result-screen[data-profile="refreshed"] .result-product-block h2,
.result-screen[data-profile="refreshed"] small.result-subtitle {
    color: #C7000B;
}

.result-screen[data-profile="playful"] .result-character-panel h1, .share-page[data-profile="playful"] .share-hero h1,
.result-screen[data-profile="playful"] .result-tagline, .result-screen[data-profile="playful"] .result-product-block h2,
.result-screen[data-profile="playful"] small.result-subtitle {
    color: #bd8500;
}

.result-screen[data-profile="cosy"] .result-character-panel h1, .share-page[data-profile="cosy"] .share-hero h1,
.result-screen[data-profile="cosy"] .result-tagline, .result-screen[data-profile="cosy"] .result-product-block h2,
.result-screen[data-profile="cosy"] small.result-subtitle {
    color: #AD9677;
}

.result-screen[data-profile="fired-up"] .result-character-panel h1, .share-page[data-profile="fired-up"] .share-hero h1,
.result-screen[data-profile="fired-up"] .result-tagline, .result-screen[data-profile="fired-up"] .result-product-block h2,
.result-screen[data-profile="fired-up"] small.result-subtitle {
    color: #ed553c;
}

.result-character {
    width: min(100%, 609px);
    height: clamp(180px, 50svh, 520px);
    margin: 0 auto;
}

.result-tagline {
    margin: 0 auto;
    max-width: 560px;
    color: var(--brown);
    font-size: clamp(13px, 1.5vw, 28px);
    font-style: italic;
}


.result-details {
    width: 100%;
    margin-top: 10px;
}

.result-product-block {
    display: grid;
    grid-template-columns: minmax(100px, 135px) 1fr;
    align-items: center;
    gap: 20px;
}

.product-art {
    width: 130%;
    height: 170px;
}

.result-product-block h2 {
    margin: 2px 0;
    color: var(--brown);
    font-family: var(--font-body);
    font-size: clamp(22px, 3vw, 46px);
    line-height: 1.05;
    font-weight: 900;
}

.result-product-block h3 {
    margin: 2px 0;
    font-family: var(--font-body);
    font-size: clamp(14px, 1.5vw, 26px);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}

.result-product-block p:not(.eyebrow) {
    margin: 0px 0;
    line-height: 1.2;
}

.pairing-title {
    margin: 46px 50px 20px;
    text-align: left;
}

.pair-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0px;
}

.pair-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    font-size: clamp(11px, .9vw, 16px);
}

.pair-art {
    width: 100%;
    height: 160px;
}

.allergen-note {
    color: #7f3428;
    font-weight: 700;
}

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

.result-actions .btn {
    min-width: 160px;
}

.result-share-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
    font-size: clamp(11px, 1vw, 20px);
    font-weight: 700;
}

/* The Crowd Has Spoken: stable ranking, enlarged champion panel. */
.community-screen {
    width: min(100%, 1300vw);
    height: calc(100svh - 100px);
    overflow: hidden;
    margin: auto;
    padding: 10px clamp(12px, 11vw, 165px) 24px;
    text-align: center;
}

.community-screen h1 {
    margin: 4px auto 12px;
    font-family: var(--font-display);
    font-size: clamp(26px, 5vw, 42px);
    line-height: 1.12;
}

.ranking-list {
    width: min(100%, 1020px);
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    padding: 35px 10vw 10px;
}

.ranking-card {
    position: relative;
    min-height: 60px;
    padding: 10px clamp(10px, 4vw, 60px) 10px 20px;
    display: grid;
    grid-template-columns: clamp(80px, 9vw, 111px) 1fr;
    align-items: center;
    gap: 17px;
    border-radius: 27px;
    background: var(--orange);
    color: var(--text-purple);
    text-align: left;
}

.ranking-card.is-champion {
    min-height: 80px;
    grid-template-columns: 30% 1fr;
    background: var(--purple);
    color: #fff;
    transform: scale(1.3);
    z-index: 1;
    margin-bottom: 0.8vw;
    margin-top: 0.8vw;
    padding: 5px clamp(10px, 3vw, 50px) 5px 10px;
}

.ranking-card.is-champion .ranking-character {
    display: block;
    height: clamp(70px, 7vw, 90px);
    max-height: 110px;
    position: relative;
    align-self: start;
    margin-top: -6px;
    margin-left: 12px;
}

.ranking-character.is-animated .ranking-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 120%;
    max-height: none;
    object-fit: contain;
    object-position: bottom;
    top: -0.28vw;
}

.ranking-character.is-animated .champion-frame {
    animation-duration: 1.2s;
    animation-iteration-count: infinite;
    animation-timing-function: steps(1, end);
}

.champion-frame-first { animation-name: champion-frame-one; }
.champion-frame-second { animation-name: champion-frame-two; }

@keyframes champion-frame-one {
    0%, 49.999% { visibility: visible; }
    50%, 100% { visibility: hidden; }
}

@keyframes champion-frame-two {
    0%, 49.999% { visibility: hidden; }
    50%, 100% { visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
    .ranking-character.is-animated .champion-frame { animation: none; }
    .ranking-character.is-animated .champion-frame-first { visibility: visible; }
    .ranking-character.is-animated .champion-frame-second { visibility: hidden; }
}

.ranking-art {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
    object-position: center;
    margin-top: -9px;
    margin-bottom: -9px;
}

.ranking-icon {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--cream);
    font-size: 16px;
}

.is-champion .ranking-icon {
    left: 12px;
    top: 12px;
    width: 30px;
    height: 30px;
    font-size: 20px;
}

.ranking-data {
    min-width: 0;
}

.ranking-label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    font-size: clamp(16px, 1.3vw, 30px);
    font-weight: 600;
}

.ranking-label strong {
    white-space: nowrap;
    font-weight: 600;
}

.ranking-name {
    margin: 1px 0 6px;
    font-size: clamp(12px, 1.2vw, 21px);
    font-weight: 700;
}

.ranking-track {
    height: clamp(10px, 1.3vw, 19px);
    margin-top: 4px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--cream);
}

.ranking-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--red);
}

.community-signoff {
    margin: 3vh auto 3vh;
}

.community-signoff h2 {
    margin: 0 auto 5px;
    font-family: var(--font-body);
    font-size: clamp(18px, 1.65vw, 31px);
    font-weight: 900;
    line-height: 1.2;
}

.community-signoff p {
    margin: 0;
    font-size: clamp(13px, 1.1vw, 20px);
}

/* Profile-specific share landing page. */
.share-document {
    height: 100svh;
    overflow: hidden;
}

.share-page {
    width: min(100%, 970px);
    margin: 0 auto 15px;
    padding: 6px clamp(12px, 3vw, 30px) 24px;
}

.share-notice {
    text-align: center;
    color: var(--red);
}

.share-hero {
    text-align: center;
}

.share-kicker {
    margin: 12px 0 0;
    font-family: var(--font-display);
    font-size: clamp(14px, 1.4vw, 25px);
    font-weight: 400;
}

.share-hero h1 {
    margin: 2px 0;
    color: var(--brown);
    font-family: var(--font-display);
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1;
    font-weight: 400;
}

.share-tagline {
    margin: 0 auto 8px;
    color: var(--brown);
    font-family: var(--font-display);
    font-size: clamp(18px, 1.9vw, 34px);
    font-weight: 400;
}

.share-character {
    width: min(100%, 650px);
    height: clamp(160px, 30vw, 280px);
    margin: 0 auto;
}

.share-quote {
    margin: -2px 0 16px;
    color: var(--brown);
    font-size: clamp(13px, 1.2vw, 20px);
    font-style: italic;
}

.share-product {
    display: grid;
    grid-template-columns: 190px 1fr;
    align-items: center;
    gap: 14px;
    margin: 10px 0 14px;
}

.share-product-image {
    width: 100%;
    height: 110px;
}

.share-product h2 {
    margin: 0;
    color: var(--brown);
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 40px);
    line-height: 1;
    font-weight: 400;
}

.share-product h3 {
    margin: 5px 0;
    font-family: var(--font-display);
    font-size: clamp(15px, 1.5vw, 24px);
    font-weight: 400;
}

.share-product p:not(.share-kicker) {
    margin: 5px 0;
    line-height: 1.45;
}

.share-pairings {
    text-align: center;
}

.share-pair-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px 0;
}

.share-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.share-pair img {
    width: 100%;
    height: 70px;
}

.share-actions {
    text-align: center;
}

.share-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

.social-button {
    width: 40px;
    height: 40px;
    display: block;
    place-items: center;
    border: 0;
    padding: 0;
    background: none;
}

.social-button img {
    width: 100%;
}

.qr-panel {
    width: min(100%, 250px);
    margin: 16px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-panel img {
    width: 130px;
    aspect-ratio: 1;
}

.qr-panel p {
    margin: 4px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.qr-panel code {
    max-width: 100%;
    color: var(--muted);
    font-size: 9px;
    overflow-wrap: anywhere;
}

.share-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 14px 0 8px;
}

.share-action-buttons .btn {
    min-width: 180px;
}

.text-link {
    color: var(--red);
    font-weight: 700;
}

.landing-text-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 124px;
    flex-direction: column;
}