@font-face {
    font-family: "Geist";
    src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue: #008de4;
    --blue-strong: #0069b4;
    --ink: #101820;
    --muted: #66727f;
    --line: #e6ebef;
    --soft: #f2f8fc;
    --success: #16845b;
    --danger: #b9382f;
    --canvas: #edf2f5;
    font-family: "Geist", system-ui, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100svh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

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

.raffle-shell {
    display: flex;
    flex-direction: column;
    width: min(100%, 480px);
    min-height: 100svh;
    margin: 0 auto;
    padding: 0 24px;
    overflow: hidden;
    background: #ffffff;
}

.raffle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.dash-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.dash-mark {
    width: 24px;
    height: 17px;
    background: var(--blue);
    clip-path: polygon(18% 0, 100% 0, 78% 100%, 0 100%);
}

.testnet-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.16em;
}

.journey-progress {
    height: 2px;
    overflow: hidden;
    background: var(--line);
}

.journey-progress span {
    display: block;
    width: 8%;
    height: 100%;
    background: var(--blue);
    transform-origin: left;
    transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.raffle-app {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: clamp(38px, 7svh, 68px) 0 32px;
    outline: none;
}

.screen {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    animation: screen-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen-kicker {
    margin: 0 0 14px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 12ch;
    margin-bottom: 18px;
    font-size: clamp(38px, 12vw, 56px);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

h2 {
    margin-bottom: 12px;
    font-size: 27px;
    font-weight: 640;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.lede {
    max-width: 34ch;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
}

.screen-actions {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-top: 36px;
}

.primary-action,
.secondary-action,
.link-action {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 0 20px;
    border: 0;
    cursor: pointer;
    font-weight: 670;
    text-decoration: none;
    transition:
        transform 160ms ease,
        background 160ms ease,
        opacity 160ms ease;
}

.primary-action {
    color: #ffffff;
    background: var(--blue);
}

.primary-action:hover,
.primary-action:focus-visible {
    background: var(--blue-strong);
    transform: translateY(-1px);
}

.secondary-action,
.link-action {
    color: var(--ink);
    background: var(--soft);
}

.text-action {
    min-height: 44px;
    padding: 0;
    border: 0;
    color: var(--blue-strong);
    background: transparent;
    cursor: pointer;
    font-weight: 620;
}

button:disabled,
.is-disabled {
    cursor: not-allowed;
    opacity: 0.42;
    transform: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(0, 141, 228, 0.24);
    outline-offset: 3px;
}

.notice {
    margin: 22px 0 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.notice.error {
    color: var(--danger);
}

.check-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 28px;
    color: var(--ink);
    line-height: 1.45;
}

.check-row input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--blue);
}

.seed-surface {
    margin-top: 28px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.seed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: seed;
}

.seed-grid li {
    counter-increment: seed;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 8px;
    min-width: 0;
    font-size: 15px;
    font-weight: 610;
}

.seed-grid li::before {
    content: counter(seed, decimal-leading-zero);
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.8;
}

.field-stack {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.field input,
.field select {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-bottom: 1px solid #b8c4ce;
    border-radius: 0;
    padding: 0;
    color: var(--ink);
    background: transparent;
    font-size: 17px;
}

.field input::placeholder {
    color: #9aa5ae;
}

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

.challenge-grid .field input {
    min-width: 0;
}

.account-lines {
    margin-top: 30px;
    border-top: 1px solid var(--line);
}

.account-line {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}

.account-line span {
    color: var(--muted);
    font-size: 13px;
}

.account-line strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 620;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quest-list {
    margin-top: 28px;
    border-top: 1px solid var(--line);
}

.quest-row {
    display: grid;
    width: 100%;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 76px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: transparent;
    text-align: left;
}

button.quest-row {
    cursor: pointer;
}

.quest-index {
    color: var(--muted);
    font-size: 12px;
}

.quest-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.quest-copy strong {
    font-size: 14px;
    letter-spacing: -0.01em;
}

.quest-copy small,
.quest-status {
    color: var(--muted);
    font-size: 12px;
}

.quest-row[data-status="completed"] .quest-status {
    color: var(--success);
}

.quest-row[data-status="active"] .quest-status {
    color: var(--blue-strong);
}

.quest-row[data-status="active"]:last-child {
    animation: unlock-pulse 600ms ease-out both;
}

.event-status {
    display: grid;
    gap: 4px;
    margin-top: 28px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.event-status strong {
    font-size: 15px;
}

.event-status span {
    color: var(--muted);
    font-size: 13px;
}

.spinner {
    width: 28px;
    height: 28px;
    margin: 32px 0;
    border: 2px solid var(--line);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

.success-mark {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    margin-bottom: 34px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--success);
    font-size: 34px;
    animation: unlock-pulse 600ms ease-out both;
}

.raffle-footer {
    min-height: 52px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@keyframes screen-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes unlock-pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.96);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@media (max-width: 380px) {
    .raffle-shell {
        padding: 0 18px;
    }

    .challenge-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (min-width: 481px) {
    body {
        padding: 24px 0;
    }

    .raffle-shell {
        min-height: calc(100svh - 48px);
        border-radius: 16px;
        box-shadow: 0 28px 80px rgba(21, 45, 61, 0.12);
    }
}

@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;
    }
}
