:root {
    --christmas-red: #c8324d;
    --christmas-red-dark: #9f2038;
    --forest: #123f30;
    --forest-soft: #1d6048;
    --cream: #fffaf0;
    --ink: #18342a;
    --muted: #66786f;
    --gold: #e7b84c;
    --line: rgba(18, 63, 48, .14);
    --shadow: 0 24px 70px rgba(7, 31, 23, .2);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--forest);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: inherit;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 1000000;
    padding: .75rem 1rem;
    border-radius: .5rem;
    background: #fff;
    color: var(--forest);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform .2s ease;
}

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

.site-page {
    margin: 0;
    background: var(--forest);
}

.site-page::before {
    content: "";
    position: fixed;
    inset: -3%;
    z-index: -2;
    background:
        linear-gradient(115deg, rgba(6, 37, 27, .86), rgba(9, 42, 31, .48)),
        url("../images/winter.jpg") center / cover no-repeat;
    filter: saturate(.84);
}

.site-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .35;
    background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.hero-screen,
.draw-screen {
    min-height: 100vh;
}

.hero-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-nav,
.draw-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand:hover,
.brand:focus {
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 2.7rem;
    height: 2.7rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
}

.nav-button,
.secondary-action {
    border-color: rgba(255, 255, 255, .4);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    backdrop-filter: blur(12px);
}

.nav-button:hover,
.nav-button:focus,
.secondary-action:hover,
.secondary-action:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.nav-button .uk-icon {
    margin-right: .35rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.signed-user {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .84);
    font-size: .9rem;
    font-weight: 700;
}

.logout-form {
    margin: 0;
}

.logout-button {
    color: rgba(255, 255, 255, .78);
    font-size: .86rem;
    text-transform: none;
}

.logout-button:hover,
.logout-button:focus {
    color: #fff;
}

.hero-content {
    width: min(820px, 100%);
    margin: auto 0;
    padding: 5rem 0 7rem;
    color: #fff;
}

.eyebrow,
.section-kicker,
.result-overline {
    margin: 0 0 1rem;
    color: var(--gold);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.eyebrow span {
    margin-right: .4rem;
}

.hero-content h1 {
    max-width: 780px;
    margin: 0;
    color: #fff;
    font-size: clamp(3.4rem, 8.7vw, 7rem);
    font-weight: 850;
    letter-spacing: -.065em;
    line-height: .92;
    text-wrap: balance;
    text-shadow: 0 4px 32px rgba(0, 0, 0, .25);
}

.hero-lead {
    max-width: 650px;
    margin: 1.8rem 0 0;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(1.08rem, 2vw, 1.32rem);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 2.2rem;
}

.primary-action,
.draw-button {
    border-radius: 999px;
    background: var(--christmas-red);
    box-shadow: 0 13px 30px rgba(200, 50, 77, .28);
    font-weight: 800;
    letter-spacing: .01em;
    text-transform: none;
}

.primary-action:hover,
.primary-action:focus,
.draw-button:hover,
.draw-button:focus {
    background: var(--christmas-red-dark);
}

.primary-action .uk-icon {
    margin-left: .4rem;
}

.progress-card {
    width: min(460px, 100%);
    margin-top: 3rem;
    padding: 1rem 1.15rem .9rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    background: rgba(9, 42, 31, .45);
    backdrop-filter: blur(14px);
}

.progress-card > div,
.draw-progress-copy {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.progress-card strong {
    color: #fff;
    font-size: 1.1rem;
}

.progress-card span {
    color: rgba(255, 255, 255, .72);
    font-size: .88rem;
}

.progress-card .uk-progress,
.draw-progress .uk-progress {
    height: 7px;
    margin: .75rem 0 0;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, .18);
}

.progress-card .uk-progress::-webkit-progress-bar,
.draw-progress .uk-progress::-webkit-progress-bar {
    background: rgba(255, 255, 255, .18);
}

.progress-card .uk-progress::-webkit-progress-value,
.draw-progress .uk-progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--gold);
}

.progress-card .uk-progress::-moz-progress-bar,
.draw-progress .uk-progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--gold);
}

.draw-screen {
    padding-bottom: 4rem;
}

.draw-header {
    color: #fff;
}

.draw-header .uk-button-text {
    color: rgba(255, 255, 255, .82);
    text-transform: none;
}

.back-button,
.reveal-back {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .86);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.back-button:hover,
.back-button:focus,
.reveal-back:hover,
.reveal-back:focus {
    color: #fff;
    text-decoration: none;
}

.back-button:disabled {
    opacity: .45;
    cursor: wait;
}

.draw-card {
    overflow: hidden;
    padding: clamp(1.4rem, 5vw, 3.5rem);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 28px;
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.draw-card-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gift-icon {
    width: 4rem;
    height: 4rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #f7e7e8;
    font-size: 2rem;
}

.draw-card-heading .section-kicker {
    margin-bottom: .35rem;
    color: var(--christmas-red);
}

.draw-card h2,
.modal-heading h2,
.reveal-card h1 {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: -.035em;
}

.rules-card {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-top: 2rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #eef6f1;
    color: #355a4b;
}

.rules-card p {
    margin: 0;
    line-height: 1.55;
}

.rules-icon {
    flex: 0 0 auto;
    color: var(--forest-soft);
}

.draw-animation {
    margin-top: 1.5rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid rgba(231, 184, 76, .55);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(231, 184, 76, .2), transparent 36%),
        linear-gradient(145deg, #fffdf7, #f5faf7);
    box-shadow: 0 16px 38px rgba(18, 63, 48, .1);
}

.draw-animation-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1rem;
}

.draw-animation-header .section-kicker {
    margin-bottom: .2rem;
    color: var(--christmas-red);
}

.draw-animation-header h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.25rem, 3vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -.025em;
}

.draw-animation-symbol {
    width: 2.9rem;
    height: 2.9rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--forest);
    color: var(--gold);
    font-size: 1.2rem;
    box-shadow: 0 0 0 6px rgba(18, 63, 48, .08);
}

.draw-animation.is-running .draw-animation-symbol {
    animation: draw-symbol-pulse 1s ease-in-out infinite;
}

.draw-candidates {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .65rem;
}

.draw-candidate {
    position: relative;
    min-width: 0;
    padding: .42rem;
    border: 2px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 4px 13px rgba(18, 63, 48, .08);
    transition:
        opacity .22s ease,
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease,
        background-color .22s ease;
}

.draw-candidate-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 10px;
    background: #dbe5df;
}

.draw-candidate-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: filter .22s ease, transform .22s ease;
}

.draw-candidate-name {
    display: block;
    overflow: hidden;
    margin-top: .4rem;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-participant-badge,
.selected-candidate-mark {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 900;
}

.current-participant-badge {
    top: .35rem;
    left: .35rem;
    min-height: 1.45rem;
    padding: 0 .45rem;
    background: rgba(18, 63, 48, .88);
    color: #fff;
    font-size: .65rem;
    letter-spacing: .04em;
}

.selected-candidate-mark {
    right: .4rem;
    bottom: .4rem;
    width: 1.8rem;
    height: 1.8rem;
    opacity: 0;
    transform: scale(.5);
    background: var(--gold);
    color: #332504;
    font-size: 1rem;
    transition: opacity .22s ease, transform .22s ease;
}

.draw-candidate.is-current {
    border-color: rgba(18, 63, 48, .18);
    border-style: dashed;
    background: rgba(231, 237, 233, .75);
}

.draw-candidate.is-current .draw-candidate-image img {
    filter: grayscale(.6);
}

.draw-candidate.is-active {
    z-index: 3;
    border-color: var(--gold);
    background: #fff9e5;
    box-shadow: 0 10px 25px rgba(159, 117, 18, .26), 0 0 0 3px rgba(231, 184, 76, .18);
    transform: translateY(-4px) scale(1.035);
}

.draw-candidate.is-active .draw-candidate-image img {
    transform: scale(1.055);
}

.draw-candidate.is-selected {
    z-index: 4;
    border-color: var(--gold);
    background: #fff5cf;
    box-shadow: 0 14px 34px rgba(159, 117, 18, .3), 0 0 0 4px rgba(231, 184, 76, .2);
    transform: translateY(-5px) scale(1.06);
    animation: selected-candidate-pulse .8s ease-in-out 2;
}

.draw-candidate.is-selected .selected-candidate-mark {
    opacity: 1;
    transform: scale(1);
}

.draw-candidate.is-selected .draw-candidate-name {
    color: var(--christmas-red-dark);
}

.draw-candidate.is-dimmed {
    opacity: .32;
    transform: scale(.95);
}

.draw-animation-hint {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.5;
    text-align: center;
}

@keyframes draw-symbol-pulse {
    0%, 100% {
        box-shadow: 0 0 0 5px rgba(18, 63, 48, .08);
        transform: rotate(0deg) scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(231, 184, 76, .14);
        transform: rotate(90deg) scale(1.08);
    }
}

@keyframes selected-candidate-pulse {
    0%, 100% {
        transform: translateY(-5px) scale(1.06);
    }
    50% {
        transform: translateY(-5px) scale(1.1);
    }
}

.draw-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
    margin-top: 2rem;
}

.single-action-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.identity-confirmation {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 0 1rem;
    border: 1px solid #cad8d1;
    border-radius: 12px;
    background: #f8fbf9;
    color: var(--forest);
}

.identity-confirmation strong {
    margin-left: .15rem;
}

.draw-form .uk-form-label {
    display: block;
    margin-bottom: .55rem;
    color: var(--ink);
    font-weight: 800;
}

.draw-form .uk-select {
    height: 58px;
    border: 1px solid #cad8d1;
    border-radius: 12px;
    background-color: #fff;
    color: var(--ink);
}

.draw-form .uk-select:focus {
    border-color: var(--forest-soft);
    box-shadow: 0 0 0 3px rgba(29, 96, 72, .12);
}

.draw-button {
    min-width: 190px;
    height: 58px;
}

.draw-button:disabled {
    background: #d7dcda;
    box-shadow: none;
    color: #829088;
}

.button-spinner {
    margin-left: .4rem;
}

.draw-alert {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: 1.2rem;
    border-radius: 12px;
}

.draw-alert p,
.compact-alert p {
    margin: 0;
}

.result-card {
    position: relative;
    margin-top: 2.3rem;
    padding: 2.3rem 1.5rem;
    border: 1px solid #e3d6b8;
    border-radius: 22px;
    background: linear-gradient(160deg, #fffdf7, #f8f0df);
    text-align: center;
}

.result-overline {
    color: var(--christmas-red);
}

.result-image-wrap {
    width: min(260px, 72vw);
    aspect-ratio: 1;
    margin: 0 auto 1.4rem;
    padding: 7px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 16px 40px rgba(65, 47, 12, .17);
}

.result-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.result-stars {
    display: flex;
    justify-content: center;
    gap: 4.5rem;
    margin-bottom: -1.1rem;
    color: var(--gold);
}

.result-card h2 {
    font-size: clamp(2.3rem, 8vw, 4.2rem);
    line-height: 1;
}

.result-description {
    max-width: 560px;
    margin: 1rem auto 1.5rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.compact-alert {
    max-width: 560px;
    margin: 0 auto 1.4rem;
    border-radius: 12px;
}

.result-card .uk-button-default {
    border-radius: 999px;
    border-color: #becdc5;
    color: var(--forest);
    font-weight: 700;
    text-transform: none;
}

.draw-progress {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.draw-progress-copy {
    color: var(--muted);
    font-size: .9rem;
}

.draw-progress-copy strong {
    color: var(--forest);
}

.draw-progress .uk-progress {
    background: #e4ebe7;
}

.draw-progress .uk-progress::-webkit-progress-bar {
    background: #e4ebe7;
}

.draw-progress .uk-progress::-webkit-progress-value,
.draw-progress .uk-progress::-moz-progress-bar {
    background: var(--forest-soft);
}

.participants-modal {
    width: min(920px, calc(100vw - 2rem));
    border-radius: 24px;
}

.modal-heading {
    margin-bottom: 1.8rem;
    text-align: center;
}

.modal-heading .section-kicker {
    margin-bottom: .4rem;
    color: var(--christmas-red);
}

.modal-heading h2 {
    font-size: 2.4rem;
}

.modal-heading p:last-child {
    margin: .5rem 0 0;
    color: var(--muted);
}

.participant-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 15px;
    background: #dbe5df;
    box-shadow: 0 5px 15px rgba(17, 50, 38, .08);
}

.participant-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.participant-card span {
    position: absolute;
    right: .55rem;
    bottom: .55rem;
    left: .55rem;
    padding: .45rem .55rem;
    border-radius: 8px;
    background: rgba(8, 34, 25, .7);
    color: #fff;
    font-size: .86rem;
    font-weight: 750;
    text-align: center;
    backdrop-filter: blur(8px);
}

.participant-card:hover img,
.participant-card:focus img {
    transform: scale(1.045);
}

#confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 999999;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.reveal-page {
    margin: 0;
    overflow: hidden;
    background: #071f18;
}

.reveal-video,
.reveal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

.reveal-video {
    object-fit: cover;
    opacity: .38;
    transform: scale(1.03);
    transition: opacity 1s ease, filter 1s ease;
    filter: saturate(.65) blur(2px);
}

.reveal-page.is-playing .reveal-video {
    opacity: .82;
    filter: saturate(1) blur(0);
}

.reveal-overlay {
    background: radial-gradient(circle at center, rgba(7, 31, 24, .08), rgba(4, 21, 15, .78));
}

.reveal-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.reveal-back {
    position: absolute;
    top: 2rem;
    left: 30px;
}

.reveal-card {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: clamp(2rem, 7vw, 4rem);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 28px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
    text-align: center;
    backdrop-filter: blur(18px);
}

.reveal-icon {
    display: block;
    margin-bottom: .8rem;
    font-size: 3.2rem;
}

.reveal-card .section-kicker {
    margin-bottom: .45rem;
    color: var(--christmas-red);
}

.reveal-card h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    line-height: 1.03;
}

.reveal-card > p:not(.section-kicker, .play-status) {
    margin: 1rem auto 1.8rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.reveal-card .primary-action .uk-icon {
    margin: 0 .4rem 0 0;
}

.play-status {
    min-height: 1.5rem;
    margin: 1rem 0 0;
    color: var(--forest-soft);
    font-weight: 650;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 3rem;
}

.auth-brand {
    width: max-content;
    margin-top: 1.35rem;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .72fr);
    align-items: center;
    gap: clamp(2rem, 7vw, 7rem);
    margin: auto 0;
    padding: 3rem 0;
}

.auth-intro {
    color: #fff;
}

.auth-intro h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(3rem, 6.5vw, 6.25rem);
    font-weight: 850;
    letter-spacing: -.06em;
    line-height: .94;
    text-wrap: balance;
    text-shadow: 0 4px 30px rgba(0, 0, 0, .22);
}

.auth-intro > p:last-child {
    max-width: 660px;
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, .8);
    font-size: 1.1rem;
    line-height: 1.65;
}

.auth-card {
    width: 100%;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 25px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.auth-card-heading {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1.5rem;
}

.auth-card-heading .section-kicker {
    margin-bottom: .25rem;
    color: var(--christmas-red);
}

.auth-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.auth-icon {
    width: 3.6rem;
    height: 3.6rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #f7e7e8;
    font-size: 1.7rem;
}

.auth-alert {
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border-radius: 12px;
}

.auth-alert p {
    margin: 0;
}

.social-login-grid {
    display: grid;
    gap: .7rem;
}

.social-button {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    border-color: #cad8d1;
    border-radius: 11px;
    color: var(--ink);
    font-weight: 700;
    text-transform: none;
}

.social-button:hover,
.social-button:focus {
    border-color: var(--forest-soft);
    background: #f5f9f7;
    color: var(--forest);
}

.facebook-button .uk-icon {
    color: #1877f2;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.25rem 0;
    color: var(--muted);
    font-size: .8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.login-link-copy {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.55;
}

.login-link-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin: .9rem 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
    text-align: center;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-form .uk-form-label,
.resend-panel .uk-form-label {
    display: block;
    margin-bottom: .4rem;
    color: var(--ink);
    font-weight: 750;
}

.auth-form .uk-input,
.auth-form .uk-select,
.resend-panel .uk-input {
    border: 1px solid #cad8d1;
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
}

.auth-form .uk-input:focus,
.auth-form .uk-select:focus,
.resend-panel .uk-input:focus {
    border-color: var(--forest-soft);
    box-shadow: 0 0 0 3px rgba(29, 96, 72, .12);
}

.auth-form ul {
    margin: .4rem 0 0;
    padding: 0;
    color: #b5213d;
    font-size: .84rem;
    list-style: none;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--muted);
    font-size: .9rem;
}

.auth-submit {
    width: 100%;
    border-radius: 999px;
    background: var(--christmas-red);
    font-weight: 800;
    text-transform: none;
}

.auth-submit .uk-icon {
    margin-right: .35rem;
}

.auth-submit:hover,
.auth-submit:focus {
    background: var(--christmas-red-dark);
}

.dev-login-note {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.2rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(231, 184, 76, .45);
    border-radius: 12px;
    background: #fff9e8;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.5;
}

.dev-login-note p {
    margin: 0;
}

.environment-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    padding: 0 .55rem;
    border-radius: 999px;
    background: var(--gold);
    color: #402f05;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.dev-provider-grid {
    margin-top: .1rem;
}

.dev-provider-grid .social-button {
    width: 100%;
}

.hero-alert {
    width: min(560px, 100%);
    margin: 0 0 1.25rem;
    border-radius: 12px;
}

.hero-alert p {
    margin: 0;
}

.dev-tools {
    width: min(560px, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: .85rem 1rem;
    border: 1px dashed rgba(231, 184, 76, .58);
    border-radius: 14px;
    background: rgba(9, 42, 31, .58);
    backdrop-filter: blur(14px);
}

.dev-tools > div {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: rgba(255, 255, 255, .8);
    font-size: .82rem;
}

.dev-tools form {
    margin: 0;
}

.dev-tools .uk-button {
    border-color: rgba(255, 255, 255, .42);
    border-radius: 999px;
    color: #fff;
    font-size: .78rem;
    text-transform: none;
}

.dev-tools .uk-button:hover,
.dev-tools .uk-button:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.auth-switch {
    margin: 1.25rem 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a,
.resend-panel summary {
    color: var(--forest-soft);
    font-weight: 750;
}

.resend-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .88rem;
}

.resend-panel summary {
    cursor: pointer;
    text-align: center;
}

.resend-panel form {
    margin-top: .8rem;
}

.resend-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
}

.resend-row .uk-button {
    border-radius: 10px;
    text-transform: none;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1.2rem;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.auth-back:hover,
.auth-back:focus {
    color: var(--forest);
    text-decoration: none;
}

.password-hint {
    margin: -.25rem 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.5;
}

.preference-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.preference-header {
    width: 100%;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.preference-private {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .74);
    font-size: .84rem;
    font-weight: 700;
}

.preference-main {
    width: 100%;
    flex: 1;
    display: grid;
    place-items: center;
    padding-top: 2.5rem;
    padding-bottom: 5rem;
}

.preference-card {
    width: min(850px, 100%);
    padding: clamp(1.4rem, 5vw, 3.4rem);
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 28px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.preference-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1.15rem;
}

.preference-gift {
    width: 4.5rem;
    height: 4.5rem;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #f7e7e8;
    font-size: 2.25rem;
}

.preference-heading .section-kicker,
.expired-card .section-kicker {
    margin-bottom: .4rem;
    color: var(--christmas-red);
}

.preference-heading h1,
.expired-card h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: 1.08;
    text-wrap: balance;
}

.preference-heading p:last-child,
.expired-card > p:not(.section-kicker) {
    max-width: 650px;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.preference-alert {
    margin: 1.5rem 0 0;
    border-radius: 14px;
}

.preference-alert p {
    margin: 0;
}

.saved-preference {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(29, 96, 72, .16);
    border-radius: 14px;
    background: #eef6f1;
    color: #355a4b;
}

.saved-preference-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: var(--forest-soft);
}

.saved-preference p {
    margin: .25rem 0 0;
    white-space: pre-line;
    line-height: 1.5;
}

.gift-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin-top: 1.7rem;
}

.gift-options form {
    margin: 0;
}

.gift-option {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.1rem;
    border: 2px solid var(--line);
    border-radius: 18px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}

.gift-option:hover,
.gift-option:focus-visible {
    border-color: rgba(29, 96, 72, .52);
    background: #fbfdfc;
    box-shadow: 0 12px 28px rgba(18, 63, 48, .11);
    outline: none;
    transform: translateY(-2px);
}

.gift-option.is-selected {
    border-color: var(--forest-soft);
    background: #f1f8f4;
    box-shadow: 0 0 0 3px rgba(29, 96, 72, .08);
}

.gift-option-number {
    position: absolute;
    top: .9rem;
    right: .9rem;
    width: 1.7rem;
    height: 1.7rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef2ef;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.gift-option-emoji {
    min-height: 2.5rem;
    display: block;
    font-size: 2rem;
}

.gift-option-copy {
    display: grid;
    gap: .4rem;
    margin-top: .75rem;
}

.gift-option-copy strong {
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.25;
}

.gift-option-copy small {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.48;
}

.gift-option-check,
.gift-option-arrow {
    position: absolute;
    right: 1rem;
    bottom: .9rem;
    color: var(--forest-soft);
}

.gift-option-check {
    opacity: 0;
}

.gift-option.is-selected .gift-option-check {
    opacity: 1;
}

.gift-option-arrow {
    transition: transform .2s ease;
}

.gift-option[aria-expanded="true"] .gift-option-arrow {
    transform: rotate(180deg);
}

.gift-options form.is-submitting .gift-option,
.wish-form.is-submitting .wish-submit {
    opacity: .62;
    pointer-events: none;
}

.wish-form {
    margin-top: 1rem;
    padding: 1.3rem;
    border: 1px solid rgba(18, 63, 48, .15);
    border-radius: 18px;
    background: #f7faf8;
}

.wish-form .uk-form-label {
    display: block;
    margin-bottom: .55rem;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 800;
}

.wish-form .uk-textarea {
    min-height: 140px;
    padding: .85rem 1rem;
    border: 1px solid rgba(18, 63, 48, .24);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    line-height: 1.55;
    resize: vertical;
}

.wish-form .uk-textarea:focus {
    border-color: var(--forest-soft);
    box-shadow: 0 0 0 3px rgba(29, 96, 72, .1);
}

.wish-form-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .55rem;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}

.wish-form-meta span:last-child {
    flex: 0 0 auto;
}

.wish-submit {
    margin-top: 1.1rem;
    border-radius: 999px;
    background: var(--christmas-red);
    font-weight: 800;
    text-transform: none;
}

.wish-submit:hover,
.wish-submit:focus {
    background: var(--christmas-red-dark);
}

.wish-submit .uk-icon {
    margin-left: .35rem;
}

.preference-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin: 1.4rem 0 0;
    color: var(--muted);
    font-size: .82rem;
    text-align: center;
}

.expired-card {
    max-width: 650px;
    text-align: center;
}

.expired-icon {
    display: block;
    margin-bottom: .8rem;
    font-size: 3rem;
}

.expired-card > p:not(.section-kicker) {
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 700px) {
    .site-nav,
    .draw-header {
        min-height: 72px;
    }

    .brand > span:last-child {
        display: none;
    }

    .nav-actions {
        gap: .5rem;
    }

    .signed-user,
    .logout-button {
        font-size: 0;
    }

    .signed-user .uk-icon,
    .logout-button::before {
        font-size: 1rem;
    }

    .logout-button::before {
        content: "↪";
    }

    .hero-content {
        padding: 3.5rem 0 5rem;
    }

    .hero-content h1 {
        font-size: clamp(3.25rem, 16vw, 5.2rem);
    }

    .hero-actions {
        display: grid;
    }

    .hero-actions .uk-button {
        width: 100%;
    }

    .progress-card {
        margin-top: 2rem;
    }

    .dev-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .dev-tools .uk-button {
        width: 100%;
    }

    .draw-form {
        grid-template-columns: 1fr;
    }

    .draw-candidates {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .48rem;
    }

    .draw-candidate {
        padding: .3rem;
        border-radius: 11px;
    }

    .draw-candidate-image {
        border-radius: 8px;
    }

    .draw-candidate-name {
        margin-top: .3rem;
        font-size: .7rem;
    }

    .draw-button {
        width: 100%;
    }

    .draw-card-heading {
        align-items: flex-start;
    }

    .gift-icon {
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 14px;
        font-size: 1.6rem;
    }

    .reveal-back {
        left: 20px;
    }

    .preference-header {
        min-height: 72px;
    }

    .preference-private {
        font-size: 0;
    }

    .preference-private .uk-icon {
        font-size: 1rem;
    }

    .preference-main {
        align-items: start;
        padding-top: 1.2rem;
        padding-bottom: 2.5rem;
    }

    .preference-card {
        border-radius: 22px;
    }

    .preference-heading {
        grid-template-columns: 1fr;
    }

    .preference-gift {
        width: 3.8rem;
        height: 3.8rem;
        border-radius: 16px;
        font-size: 1.9rem;
    }

    .gift-options {
        grid-template-columns: 1fr;
    }

    .gift-option {
        min-height: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: .85rem;
        padding: 1rem 3.2rem 1rem 1rem;
    }

    .gift-option-emoji {
        min-height: 0;
        font-size: 1.75rem;
    }

    .gift-option-copy {
        margin-top: 0;
    }

    .gift-option-number {
        display: none;
    }

    .gift-option-check,
    .gift-option-arrow {
        right: 1rem;
        bottom: auto;
    }

    .wish-form-meta {
        align-items: flex-end;
        flex-direction: column;
        gap: .3rem;
    }

    .wish-submit {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
        gap: 2.2rem;
        padding-top: 4rem;
    }

    .auth-intro {
        text-align: center;
    }

    .auth-intro h1,
    .auth-intro > p:last-child {
        margin-right: auto;
        margin-left: auto;
    }

    .auth-card {
        width: min(560px, 100%);
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
