.game-page {
    min-height: 100svh;
    color: #fff;
}

.game-page [hidden] {
    display: none !important;
}

.game-shell {
    width: min(calc(100% - 40px), var(--header-inner-width));
    margin-right: auto;
    margin-left: auto;
}

.game-header {
    min-height: 100svh;
}

.game-header-compact {
    min-height: var(--header-height);
    padding-top: var(--header-height);
}

.game-topbar {
    left: 0;
    transform: none;
    width: 100%;
}

.game-topbar::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: -1;
    height: var(--header-height);
    background: rgba(0, 53, 142, 0.94);
    backdrop-filter: blur(14px);
    opacity: 1;
    transition: opacity 180ms ease;
}

.game-topbar.is-scrolled::before,
.game-topbar:focus-within::before {
    opacity: 1;
}

.game-hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: calc(100svh - var(--header-height));
    padding: var(--hero-content-top) 0 112px;
    text-align: center;
}

.game-title-row {
    margin: 0 0 16px;
}

.game-title-icon {
    width: clamp(92px, 15.3vw, 192px);
}

.game-hero > p:not(.eyebrow) {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(var(--font-size-base), 0.94rem + 0.55vw, 1.3rem);
}

.game-rule-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 720px);
    gap: 10px;
    margin-top: 32px;
}

.game-rule-chips span {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 10px;
    align-content: center;
    min-height: 76px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.game-rule-chips span::before {
    content: "✓";
    display: grid;
    grid-row: 1 / span 2;
    width: 24px;
    height: 24px;
    align-self: center;
    border-radius: 50%;
    background: var(--color-green);
    color: var(--text-on-dark);
    font-size: var(--font-size-xs);
    font-weight: 800;
    place-items: center;
}

.game-rule-chips strong {
    grid-column: 2;
    color: var(--text-on-dark);
    font-size: var(--font-size-sm);
    font-weight: 800;
}

.game-rule-chips small {
    grid-column: 2;
    margin-top: 2px;
    color: var(--text-on-dark-muted);
    font-size: var(--font-size-xs);
}

.game-main {
    display: grid;
    gap: 32px;
    padding-top: 32px;
    padding-bottom: 64px;
}

.game-card,
.leaderboard-card {
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: var(--glass-surface-strong);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.game-card h1,
.game-card h2,
.game-section h2 {
    margin: 4px 0 12px;
    color: #fff;
}

.game-card p,
.game-section-heading > p {
    color: rgba(255, 255, 255, 0.8);
}

.game-card .eyebrow,
.game-section-heading .eyebrow {
    color: var(--color-green);
}

.game-start-form {
    margin-top: 24px;
}

.game-start-layout {
    display: grid;
    grid-template-areas:
        "copy visual"
        "form visual";
    grid-template-columns: minmax(0, 1fr) clamp(220px, 26vw, 300px);
    column-gap: clamp(24px, 5vw, 64px);
    align-items: center;
}

.game-start-copy {
    grid-area: copy;
}

.game-start-card.is-nfc-recognized {
    border-color: rgba(45, 157, 0, 0.82);
    box-shadow: 0 0 0 4px rgba(45, 157, 0, 0.12), var(--shadow-soft);
}

.game-start-card.is-event-ended {
    border-color: rgba(126, 224, 83, 0.42);
}

.game-nfc-success {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 16px;
    padding: 16px 18px;
    border: 1px solid rgba(126, 224, 83, 0.72);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(45, 157, 0, 0.36), rgba(45, 157, 0, 0.16));
    animation: nfc-success-arrive 420ms ease-out both;
}

.game-nfc-success-icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-green);
    color: #fff;
    font-size: 1.55rem;
    font-weight: 800;
    place-items: center;
}

.game-nfc-success-copy,
.game-nfc-success-copy strong,
.game-nfc-success-copy span {
    display: block;
}

.game-nfc-success-copy strong {
    color: #fff;
    font-size: 1.08rem;
}

.game-nfc-success-copy span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.82);
    font-size: var(--font-size-sm);
}

@keyframes nfc-success-arrive {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-nfc-success {
        animation: none;
    }
}

.game-start-layout .game-start-form {
    grid-area: form;
}

.game-start-visual {
    display: grid;
    grid-area: visual;
    min-width: 0;
    place-items: center;
}

.game-start-visual img {
    width: 115%;
    max-width: none;
    transform: translateX(calc(-2.35% - clamp(12px, 2.5vw, 28px)));
    filter: drop-shadow(0 16px 24px rgba(7, 38, 45, 0.32));
}

.game-start-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

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

.game-form-row input {
    min-width: 0;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
}

.game-form-row input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.game-form-row input:focus-visible {
    border-color: var(--color-green);
}

.game-form-error {
    margin-bottom: 0;
    color: var(--color-warning) !important;
    font-weight: 800;
}

.game-form-hint {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.68) !important;
    font-size: var(--font-size-xs);
}

.game-device-note {
    margin: 0.75rem 0 0;
    color: var(--text-on-dark-muted);
}

.game-load-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 178, 189, 0.62);
    border-radius: var(--radius);
    background: rgba(139, 25, 25, 0.32);
    color: var(--text-on-dark);
}

.game-load-error .button-secondary {
    flex: 0 0 auto;
    border-color: rgba(255, 255, 255, 0.72);
}

.game-event-ended-status {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(126, 224, 83, 0.5);
    border-radius: var(--radius);
    background: rgba(45, 157, 0, 0.16);
}

.game-event-ended-status strong,
.game-event-ended-status span {
    display: block;
}

.game-event-ended-status strong {
    color: #fff;
}

.game-event-ended-status span {
    color: rgba(255, 255, 255, 0.8);
}

.game-player-heading,
.game-progress-copy,
.game-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.game-player-code {
    padding: 8px 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    font-family: var(--font-family-mono);
    font-size: var(--font-size-xs);
}

.game-progress-copy {
    align-items: center;
    margin: 24px 0 10px;
    color: rgba(255, 255, 255, 0.8);
}

.game-progress-copy strong {
    color: #fff;
    font-size: 1.15rem;
}

.game-progress {
    overflow: hidden;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.game-estimate-status {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--font-size-xs);
    font-weight: 800;
}

.game-estimate-status.is-saved {
    color: var(--color-green);
}

#tagespass {
    scroll-margin-top: 6rem;
}

.game-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--color-green);
    transition: width 240ms ease;
}

.game-score-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 24px 0 0;
}

.game-score-summary div {
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.09);
}

.game-score-summary .is-total {
    background: rgba(45, 157, 0, 0.18);
}

.game-score-summary dt {
    color: rgba(255, 255, 255, 0.68);
    font-size: var(--font-size-xs);
    font-weight: 800;
    text-transform: uppercase;
}

.game-score-summary dd {
    margin: 4px 0 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
}

.game-section {
    padding: 24px 0;
}

.game-section-heading {
    margin-bottom: 24px;
}

.game-section-heading > p {
    max-width: 500px;
    margin: 0;
}

.checkpoint-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.checkpoint-card {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(0, 53, 142, 0.78);
}

.checkpoint-card::after {
    content: attr(data-number);
    position: absolute;
    right: -4px;
    bottom: -28px;
    color: rgba(255, 255, 255, 0.08);
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
}

.checkpoint-card.is-collected {
    border-color: rgba(45, 157, 0, 0.9);
    background: rgba(28, 94, 25, 0.86);
}

.checkpoint-card.is-active {
    border-color: var(--color-warning);
    box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.16);
}

.checkpoint-card.is-expired {
    border-color: rgba(190, 198, 211, 0.28);
    background: rgba(67, 76, 91, 0.62);
    box-shadow: none;
    filter: saturate(0.3);
}

.checkpoint-card.is-expired.is-collected {
    border-color: rgba(45, 157, 0, 0.42);
    background: rgba(28, 94, 25, 0.5);
    filter: saturate(0.58);
}

.checkpoint-card.is-expired:not(.is-collected) h3,
.checkpoint-card.is-expired:not(.is-collected) p,
.checkpoint-card.is-expired:not(.is-collected) .checkpoint-time,
.checkpoint-card.is-expired:not(.is-collected) .checkpoint-points {
    color: rgba(232, 235, 240, 0.62) !important;
}

.checkpoint-card.is-expired:not(.is-collected) .checkpoint-status {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(240, 242, 246, 0.68);
}

.checkpoint-card.is-expired.is-collected .checkpoint-points {
    color: rgba(142, 225, 103, 0.7) !important;
}

.checkpoint-card.is-expired::after {
    color: rgba(255, 255, 255, 0.045);
}

.checkpoint-card h3 {
    position: relative;
    z-index: 1;
    margin: 10px 0 8px;
    color: #fff;
    font-size: 1.05rem;
}

.checkpoint-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--font-size-sm);
}

.checkpoint-card .checkpoint-token-label {
    font-size: clamp(0.72rem, 0.62rem + 0.3vw, var(--font-size-sm));
    letter-spacing: -0.015em;
    white-space: nowrap;
}

.checkpoint-card .checkpoint-token-points {
    margin-bottom: 4px;
    color: var(--color-green);
    font-size: var(--font-size-sm);
    font-weight: 800;
}

.checkpoint-status {
    position: relative;
    z-index: 1;
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: var(--font-size-xs);
    font-weight: 800;
}

.checkpoint-time {
    display: block;
    margin-top: 18px !important;
    color: #fff !important;
    font-weight: 800;
}

.checkpoint-countdown {
    margin-top: 5px !important;
    color: var(--color-warning) !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.checkpoint-points {
    margin-top: 8px !important;
    color: var(--color-green) !important;
    font-weight: 800;
}

.leaderboard-card {
    overflow-x: auto;
    padding: 0;
}

.leaderboard-card table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-card th,
.leaderboard-card td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
}

.leaderboard-card th {
    color: rgba(255, 255, 255, 0.66);
    font-size: var(--font-size-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.leaderboard-card tr.is-current-player td {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-ink);
    font-weight: 700;
}

.leaderboard-card tr.is-current-player td:first-child {
    box-shadow: inset 4px 0 0 var(--color-blue-highlight);
}

.leaderboard-empty,
.local-preview-note {
    margin: 0;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.local-preview-note {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: var(--font-size-xs);
}

.game-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.prize-showcase {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.prize-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.09);
}

.prize-product-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: calc(var(--radius) - 4px);
    background: #fff;
    object-fit: contain;
}

.prize-rank {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-green);
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 800;
}

.prize-product-copy h3 {
    margin: 8px 0 6px;
    color: #fff;
    font-size: 1.2rem;
}

.prize-product-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: var(--font-size-sm);
}

.prize-product-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
}

.prize-product-links a {
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 800;
    text-underline-offset: 0.2em;
}

.prize-tie-note {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.76) !important;
    font-size: var(--font-size-sm);
}

.prize-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.prize-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
}

.prize-list span {
    color: rgba(255, 255, 255, 0.7);
}

.rules-card ul {
    margin: 20px 0 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.82);
}

.rules-card li + li {
    margin-top: 8px;
}

.game-preview-panel {
    border-color: rgba(45, 157, 0, 0.72);
}

.demo-test-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.demo-test-badge {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--color-green);
    color: #fff;
    font-weight: 800;
    line-height: 1;
}

.demo-test-summary {
    display: grid;
    gap: 4px;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 5px solid var(--color-green);
    border-radius: var(--radius);
    background: rgba(0, 53, 142, 0.58);
}

.demo-test-summary span {
    color: var(--color-green);
    font-size: var(--font-size-sm);
    font-weight: 800;
    text-transform: uppercase;
}

.demo-test-summary strong {
    color: #fff;
    font-size: 1.15rem;
}

.demo-test-summary p {
    margin: 0;
}

.demo-test-steps {
    display: grid;
    gap: 8px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.demo-test-step {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
}

.demo-test-step.is-current {
    border-color: var(--color-green);
    background: rgba(45, 157, 0, 0.14);
}

.demo-test-step.is-pending {
    opacity: 0.64;
}

.demo-test-step-marker {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
}

.demo-test-step.is-current .demo-test-step-marker {
    border-color: var(--color-green);
    color: var(--color-green);
}

.demo-test-step.is-complete .demo-test-step-marker {
    border-color: var(--color-green);
    background: var(--color-green);
}

.demo-test-step h3 {
    font-size: 1rem;
    text-shadow: none;
}

.demo-test-step p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: var(--font-size-sm);
}

.demo-test-step a {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.demo-test-step a:hover,
.demo-test-step a:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.demo-test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.demo-test-action-status {
    min-height: 1.5em;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-weight: 800;
}

.demo-test-report-output {
    width: 100%;
    min-height: 220px;
    margin-top: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius);
    background: rgba(7, 38, 45, 0.82);
    color: #fff;
    font: 0.9rem/1.5 var(--font-family-mono);
}

.checkpoint-main {
    display: grid;
    min-height: calc(100svh - var(--header-height) - 110px);
    place-items: center;
    padding-top: 48px;
    padding-bottom: 48px;
}

.checkpoint-scan-card {
    width: min(100%, 700px);
    text-align: center;
}

.checkpoint-scan-card h1,
.checkpoint-task legend,
.tie-breaker-task h2 {
    overflow-wrap: normal;
    hyphens: manual;
    text-wrap: balance;
}

.checkpoint-number {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-blue);
    font-size: 1.6rem;
    font-weight: 800;
}

.checkpoint-fragment-name {
    color: var(--color-green) !important;
    font-size: 1.1rem;
    font-weight: 800;
}

.checkpoint-window {
    font-weight: 800;
}

.checkpoint-page-countdown {
    width: fit-content;
    margin: 10px auto 0;
    padding: 7px 12px;
    border: 1px solid rgba(255, 209, 102, 0.5);
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.1);
    color: var(--color-warning) !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.checkpoint-page-countdown.is-active {
    border-color: rgba(45, 157, 0, 0.72);
    background: rgba(45, 157, 0, 0.16);
    color: var(--color-green-light) !important;
}

.checkpoint-message {
    margin: 24px 0;
}

.checkpoint-status-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: left;
}

.checkpoint-status-card[data-tone="recognized"] {
    border-color: rgba(79, 171, 255, 0.66);
    background: linear-gradient(135deg, rgba(0, 94, 194, 0.36), rgba(0, 53, 142, 0.18));
}

.checkpoint-status-card[data-tone="success"] {
    border-color: rgba(126, 224, 83, 0.72);
    background: linear-gradient(135deg, rgba(45, 157, 0, 0.36), rgba(45, 157, 0, 0.14));
}

.checkpoint-status-card[data-tone="warning"] {
    border-color: rgba(255, 209, 102, 0.58);
    background: rgba(255, 209, 102, 0.1);
}

.checkpoint-status-card[data-tone="error"] {
    border-color: rgba(255, 119, 119, 0.68);
    background: rgba(139, 25, 25, 0.22);
}

.checkpoint-status-card[data-tone="complete"] {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.07);
}

.checkpoint-status-icon,
.task-result-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    place-items: center;
}

.checkpoint-status-card[data-tone="recognized"] .checkpoint-status-icon {
    background: var(--color-blue);
}

.checkpoint-status-card[data-tone="success"] .checkpoint-status-icon,
.task-result[data-tone="success"] .task-result-icon {
    background: var(--color-green);
}

.checkpoint-status-card[data-tone="warning"] .checkpoint-status-icon {
    background: var(--color-warning);
    color: var(--color-warning-ink);
}

.checkpoint-status-card[data-tone="error"] .checkpoint-status-icon {
    background: var(--color-error);
}

.checkpoint-status-copy,
.checkpoint-status-copy strong,
.checkpoint-status-copy span {
    display: block;
}

.checkpoint-status-copy strong {
    color: #fff;
    font-size: 1.06rem;
}

.checkpoint-status-copy span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    line-height: 1.45;
}

.checkpoint-status-points {
    color: #fff;
    font-size: clamp(1.35rem, 4vw, 1.8rem);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.checkpoint-start-form {
    text-align: left;
}

.checkpoint-collect-button {
    margin-right: 8px;
}

.checkpoint-task {
    margin: 32px 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(0, 53, 142, 0.42);
    text-align: left;
}

.checkpoint-task-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.checkpoint-task-heading .eyebrow {
    margin: 0;
}

.attempt-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attempt-chip {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-xs);
    font-weight: 800;
    line-height: 1.2;
}

.checkpoint-task.final-puzzle {
    border-color: rgba(45, 157, 0, 0.72);
    background: rgba(28, 94, 25, 0.36);
}

.checkpoint-task fieldset {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.checkpoint-task legend {
    width: 100%;
    margin-bottom: 14px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.checkpoint-options {
    display: grid;
    gap: 8px;
}

.checkpoint-options label {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 48px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.checkpoint-options input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--color-green);
}

.task-feedback {
    display: grid;
    gap: 3px;
    margin: 16px 0 0;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.task-feedback strong,
.task-feedback span {
    display: block;
}

.task-feedback span {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
}

.task-feedback[data-tone="warning"] {
    border-color: rgba(255, 209, 102, 0.62);
    background: rgba(255, 209, 102, 0.12);
}

.task-feedback[data-tone="warning"] strong {
    color: var(--color-warning);
}

.task-feedback[data-tone="error"] {
    border-color: rgba(255, 119, 119, 0.68);
    background: rgba(139, 25, 25, 0.22);
}

.task-result {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid rgba(126, 224, 83, 0.72);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(45, 157, 0, 0.3), rgba(45, 157, 0, 0.12));
    outline: 0;
}

.task-result[data-tone="complete"] {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.07);
}

.task-result:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.task-result-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
}

.task-result-heading .eyebrow,
.task-result-heading h2,
.task-result-heading p {
    margin: 0;
}

.task-result-heading h2 {
    margin-top: 2px;
    color: #fff;
    font-size: clamp(1.25rem, 4vw, 1.55rem);
}

.task-result-points {
    color: #fff;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
}

.result-score-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.result-score-grid > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: calc(var(--radius) - 4px);
    background: rgba(7, 38, 45, 0.24);
}

.result-score-grid span,
.result-score-grid strong {
    display: block;
}

.result-score-grid span {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-xs);
}

.result-score-grid strong {
    margin-top: 2px;
    color: #fff;
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums;
}

.checkpoint-next-step {
    margin-top: 18px;
    padding: 18px;
    border-radius: calc(var(--radius) - 2px);
    background: rgba(7, 38, 45, 0.32);
}

.checkpoint-next-step .eyebrow,
.checkpoint-next-step h3,
.checkpoint-next-step p {
    margin: 0;
}

.checkpoint-next-step h3 {
    margin-top: 3px;
    color: #fff;
    font-size: 1.18rem;
}

.checkpoint-next-step p:not(.eyebrow) {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.78);
}

.checkpoint-next-step .button {
    width: fit-content;
    margin-top: 14px;
}

.task-result-compact .task-result-heading {
    grid-template-columns: auto minmax(0, 1fr);
}

.task-result-compact .task-result-heading > div > p:last-child {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
}

.checkpoint-status-card.is-arriving,
.task-result.is-arriving {
    animation: nfc-success-arrive 420ms ease-out both;
}

.task-feedback[hidden],
.task-result[hidden],
.checkpoint-next-step[hidden],
.final-step-complete[hidden],
[data-tie-breaker-prompt][hidden] {
    display: none;
}

.tie-breaker-task h2 {
    margin-bottom: 10px;
}

.tie-breaker-task {
    border-color: rgba(126, 224, 83, 0.78);
    background: linear-gradient(145deg, rgba(0, 72, 153, 0.58), rgba(28, 94, 25, 0.32));
    box-shadow: 0 0 0 4px rgba(45, 157, 0, 0.1);
    outline: 0;
}

.tie-breaker-task:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.final-step-complete {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid rgba(126, 224, 83, 0.58);
    border-radius: var(--radius);
    background: rgba(45, 157, 0, 0.18);
}

.final-step-complete > span {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-green);
    color: #fff;
    font-weight: 800;
    place-items: center;
}

.final-step-complete strong,
.final-step-complete small {
    display: block;
}

.final-step-complete small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.8);
}

.tie-breaker-question {
    max-width: 48ch;
    margin-top: 8px;
    color: #fff !important;
    font-size: 1.08rem;
    font-weight: 800;
}

.tie-breaker-summary {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: calc(var(--radius) - 4px);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: var(--font-size-sm);
}

.tie-breaker-summary strong {
    color: #fff;
}

.tie-breaker-details {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: var(--font-size-sm);
}

.tie-breaker-details summary {
    width: fit-content;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.tie-breaker-details p {
    max-width: 60ch;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.76) !important;
}

.tie-breaker-task form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.final-estimate-value {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(126, 224, 83, 0.44);
    border-radius: calc(var(--radius) - 4px);
    background: rgba(45, 157, 0, 0.14);
}

.final-estimate-value span,
.final-estimate-value strong {
    display: block;
}

.final-estimate-value > span {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--font-size-sm);
}

.final-estimate-value strong {
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.final-celebration {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    overflow: hidden;
    background: radial-gradient(circle at 50% 45%, rgba(0, 94, 194, 0.5), rgba(0, 18, 47, 0.78) 72%);
    backdrop-filter: blur(2px);
    pointer-events: none;
    place-items: center;
}

.final-celebration[hidden] {
    display: none;
}

.final-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.final-confetti span {
    position: absolute;
    top: -12vh;
    left: var(--confetti-x);
    width: var(--confetti-width);
    height: var(--confetti-height);
    border-radius: 2px;
    background: var(--confetti-color);
    opacity: 0;
}

.final-celebration.is-playing .final-confetti span {
    animation: final-confetti-fall 4580ms cubic-bezier(0.18, 0.68, 0.32, 1) var(--confetti-delay) both;
}

.final-confetti span:nth-child(3n) {
    border-radius: 50%;
}

.final-celebration-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(calc(100% - 40px), 390px);
    padding: 30px 34px;
    border: 1px solid rgba(126, 224, 83, 0.78);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(0, 72, 153, 0.96), rgba(28, 94, 25, 0.94));
    box-shadow: 0 28px 80px rgba(0, 18, 47, 0.58), 0 0 0 7px rgba(126, 224, 83, 0.13);
    text-align: center;
    place-items: center;
    animation: final-celebration-pop 520ms ease-out both, final-celebration-glow 4480ms ease-in-out 520ms both;
}

.final-celebration-card > span {
    display: grid;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--color-green);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    place-items: center;
}

.final-celebration.is-playing .final-celebration-card > span {
    animation: final-celebration-check 800ms cubic-bezier(0.2, 0.9, 0.28, 1.3) 280ms both;
}

.final-celebration-card strong,
.final-celebration-card small {
    display: block;
}

.final-celebration-card strong {
    color: #fff;
    font-size: 1.45rem;
    line-height: 1.2;
}

.final-celebration-card small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.82);
    font-size: var(--font-size-sm);
}

@keyframes final-confetti-fall {
    from {
        opacity: 0;
        transform: translate3d(0, -10vh, 0) rotate(0deg);
    }
    15% {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translate3d(var(--confetti-drift), 115vh, 0) rotate(var(--confetti-turn));
    }
}

@keyframes final-celebration-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes final-celebration-glow {
    0%, 100% {
        box-shadow: 0 28px 80px rgba(0, 18, 47, 0.58), 0 0 0 7px rgba(126, 224, 83, 0.13);
    }
    50% {
        box-shadow: 0 28px 90px rgba(0, 18, 47, 0.64), 0 0 0 14px rgba(126, 224, 83, 0.22);
    }
}

@keyframes final-celebration-check {
    from {
        opacity: 0;
        transform: scale(0.45) rotate(-18deg);
    }
    65% {
        opacity: 1;
        transform: scale(1.12) rotate(4deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

#final-puzzle,
#tie-breaker {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.game-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 40px;
    color: rgba(255, 255, 255, 0.78);
}

.game-footer p {
    margin: 0;
}

.game-footer .game-privacy-note {
    max-width: 72ch;
    margin-top: 0.5rem;
    font-size: var(--font-size-xs);
    line-height: 1.5;
    opacity: 0.78;
}

.game-footer a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.game-footer-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.game-footer-powered {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    font-weight: 700;
    line-height: inherit;
    white-space: nowrap;
}

.game-footer-powered img {
    width: auto;
    height: 1.1rem;
}

@media (max-width: 900px) {
    .checkpoint-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkpoint-card:last-child {
        grid-column: 1 / -1;
    }

}

@media (max-width: 640px) {
    .game-page {
        overflow-x: clip;
    }

    .game-shell {
        width: min(calc(100% - 32px), var(--header-inner-width));
    }

    .game-topbar {
        padding-right: 14px;
        padding-left: 14px;
    }

    .game-header {
        min-height: auto;
    }

    .game-hero {
        min-height: auto;
        padding: calc(var(--header-height) + 48px) 0 56px;
    }

    .game-title-row,
    .game-hero > p:not(.eyebrow),
    .game-rule-chips {
        width: 100%;
    }

    .game-title-row {
        width: 100%;
    }

    .game-hero > p:not(.eyebrow) {
        font-size: 1rem;
    }

    .game-rule-chips {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 20px;
    }

    .game-rule-chips span {
        min-height: 60px;
        padding: 10px;
    }

    .game-rule-chips strong,
    .game-rule-chips small {
        font-size: var(--font-size-xs);
    }

    .game-main {
        gap: 24px;
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .game-card,
    .leaderboard-card {
        padding: 16px;
    }

    .game-card h2,
    .game-section h2 {
        font-size: 1.65rem;
    }

    .game-start-form {
        margin-top: 16px;
    }

    .game-start-layout {
        grid-template-areas:
            "copy"
            "visual"
            "form";
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game-start-layout .game-start-form {
        margin-top: 0;
    }

    .game-start-visual {
        width: min(100%, 190px);
        justify-self: center;
    }

    .game-start-visual img {
        width: 120%;
        transform: none;
    }

    .game-form-row,
    .game-info-grid {
        grid-template-columns: 1fr;
    }

    .game-score-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-test-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .demo-test-step {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
    }

    .demo-test-step a {
        grid-column: 2;
        width: 100%;
    }

    .game-player-heading,
    .game-progress-copy,
    .game-section-heading,
    .prize-list div {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-progress-copy,
    .game-section-heading {
        gap: 8px;
    }

    .game-score-summary {
        margin-top: 16px;
    }

    .game-score-summary div {
        padding: 12px;
    }

    .game-section {
        padding: 10px 0;
    }

    .game-section-heading {
        margin-bottom: 16px;
    }

    .checkpoint-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .checkpoint-card:last-child {
        grid-column: auto;
    }

    .checkpoint-card {
        min-height: 0;
        padding: 16px;
    }

    .checkpoint-card::after {
        bottom: -18px;
        font-size: 5.5rem;
    }

    .prize-list,
    .prize-showcase {
        margin-top: 16px;
    }

    .prize-item {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .prize-product-copy h3 {
        font-size: 1.05rem;
    }

    .prize-list div {
        gap: 4px;
        padding: 12px;
    }

    .rules-card ul {
        margin-top: 14px;
    }

    .leaderboard-card {
        overflow-x: visible;
        padding: 0;
    }

    .leaderboard-card table {
        table-layout: fixed;
    }

    .leaderboard-card th:nth-child(3),
    .leaderboard-card td:nth-child(3),
    .leaderboard-card th:nth-child(4),
    .leaderboard-card td:nth-child(4),
    .leaderboard-card th:nth-child(5),
    .leaderboard-card td:nth-child(5) {
        display: none;
    }

    .leaderboard-card th,
    .leaderboard-card td {
        padding: 12px 10px;
        font-size: var(--font-size-xs);
    }

    .leaderboard-card th:first-child,
    .leaderboard-card td:first-child {
        width: 58px;
    }

    .leaderboard-card th:last-child,
    .leaderboard-card td:last-child {
        width: 72px;
        text-align: right;
    }

    .leaderboard-empty,
    .local-preview-note {
        padding: 16px;
    }

    .checkpoint-main {
        min-height: 0;
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .checkpoint-scan-card h1 {
        font-size: 1.9rem;
        line-height: 1.08;
    }

    .checkpoint-number {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
        font-size: 1.3rem;
    }

    .checkpoint-message {
        margin: 16px 0;
        padding: 16px;
    }

    .checkpoint-status-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
    }

    .checkpoint-status-points {
        grid-column: 2;
        justify-self: start;
    }

    .checkpoint-task {
        margin: 20px 0;
        padding: 16px;
    }

    .checkpoint-task-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .attempt-points {
        width: 100%;
    }

    .attempt-chip {
        flex: 1 1 150px;
        justify-content: center;
        text-align: center;
    }

    .task-result {
        padding: 16px;
    }

    .task-result-heading {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .task-result-points {
        grid-column: 2;
        justify-self: start;
    }

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

    .checkpoint-next-step .button {
        width: 100%;
    }

    .final-estimate-value {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-footer {
        gap: 16px;
        padding-top: 16px;
        padding-bottom: 28px;
        flex-direction: column;
    }

    .game-footer-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .checkpoint-status-card.is-arriving,
    .task-result.is-arriving,
    .final-celebration.is-playing .final-confetti span,
    .final-celebration-card,
    .final-celebration.is-playing .final-celebration-card > span {
        animation: none;
    }
}
