/* Extracted from templates/hud/raffles.html (07-10-2026): a static file the browser can cache. Edit here, not in the template. */
body {
    background: linear-gradient(135deg, #1a0033 0%, #4b0082 50%, #00ddeb 100%);
    min-height: 100vh;
}

:root {
    --raffles-main-block-shadow: 0 0 12px rgba(0, 0, 0, 0.78), 0 8px 20px rgba(0, 0, 0, 0.62);
    --raffles-main-block-inset: inset 0 0 0 1px rgba(255, 209, 102, 0.14);
    --raffles-disabled-btn-border: rgba(182, 152, 126, 0.36);
    --raffles-disabled-btn-bg: linear-gradient(140deg, rgba(30, 27, 35, 0.93), rgba(37, 30, 36, 0.9));
    --raffles-disabled-btn-color: #b9a996;
    --raffles-disabled-btn-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.16), 0 8px 20px rgba(0, 0, 0, 0.34);
}

.raffles-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: #f3f5f8;
}

.raffles-how-it-works .raffles-block-title {
    margin-bottom: 0.8rem;
}

.raffles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 0;
}

.raffles-kpi {
    background: rgba(7, 10, 15, 0.78);
    border: 1px solid rgba(255, 179, 71, 0.25);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    position: relative;
}

.raffles-kpi[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    min-width: 190px;
    max-width: 320px;
    padding: 0.45rem 0.56rem;
    border-radius: 9px;
    border: 1px solid rgba(139, 92, 246, 0.45);
    background: rgba(7, 10, 17, 0.96);
    color: #d9e3f6;
    font-size: 0.72rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: normal;
    box-shadow: 0 0 16px rgba(20, 241, 149, 0.16), 0 0 26px rgba(153, 69, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 25;
}

.raffles-kpi[data-tooltip]:hover::after,
.raffles-kpi[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.raffles-kpi.kpi-tooltip-flip-right[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translateY(4px);
}

.raffles-kpi.kpi-tooltip-flip-right[data-tooltip]:hover::after,
.raffles-kpi.kpi-tooltip-flip-right[data-tooltip]:focus-visible::after {
    transform: translateY(0);
}

.raffles-kpi.kpi-tooltip-flip-left[data-tooltip]::after {
    left: 0;
    right: auto;
    transform: translateY(4px);
}

.raffles-kpi.kpi-tooltip-flip-left[data-tooltip]:hover::after,
.raffles-kpi.kpi-tooltip-flip-left[data-tooltip]:focus-visible::after {
    transform: translateY(0);
}

.raffles-kpi-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: #b7c0cf;
    letter-spacing: 0.06em;
    margin-bottom: 0.42rem;
}

.raffles-kpi-value {
    font-size: 1.32rem;
    font-weight: 700;
    color: #ffd392;
}

.raffles-kpi-note {
    margin-top: 0.3rem;
    color: #fde68a;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.raffles-section {
    margin-top: 1.5rem;
    border: 1px solid rgba(149, 157, 175, 0.28);
    background: rgba(6, 9, 14, 0.86);
    border-radius: 16px;
    padding: 1.3rem;
    box-shadow: var(--raffles-main-block-shadow), var(--raffles-main-block-inset);
}

.raffles-section h2 {
    margin: 0 0 0.9rem;
    color: #f1f5ff;
    font-size: 1.28rem;
}

.raffles-help-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.92rem;
    height: 0.92rem;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.62);
    background: rgba(16, 22, 36, 0.9);
    color: #d7def0;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-transform: none;
    box-shadow: 0 0 8px rgba(20, 241, 149, 0.12), 0 0 12px rgba(153, 69, 255, 0.16);
    cursor: help;
    user-select: none;
}

.raffles-help-dot[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    min-width: 210px;
    max-width: 340px;
    padding: 0.46rem 0.58rem;
    border-radius: 9px;
    border: 1px solid rgba(139, 92, 246, 0.45);
    background: rgba(7, 10, 17, 0.96);
    color: #d9e3f6;
    font-size: 0.72rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: normal;
    box-shadow: 0 0 16px rgba(20, 241, 149, 0.16), 0 0 26px rgba(153, 69, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 30;
}

.raffles-help-dot[data-tooltip]:hover::after,
.raffles-help-dot[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.raffles-help-dot.tooltip-flip-right[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translateY(4px);
}

.raffles-help-dot.tooltip-flip-right[data-tooltip]:hover::after,
.raffles-help-dot.tooltip-flip-right[data-tooltip]:focus-visible::after {
    transform: translateY(0);
}

.raffles-help-dot.tooltip-flip-left[data-tooltip]::after {
    left: 0;
    right: auto;
    transform: translateY(4px);
}

.raffles-help-dot.tooltip-flip-left[data-tooltip]:hover::after,
.raffles-help-dot.tooltip-flip-left[data-tooltip]:focus-visible::after {
    transform: translateY(0);
}

/* Settlement Flow: four coloured steps + closing rules (landing). */
.settle-flow {
    background:
        radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.09), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(74, 222, 128, 0.08), transparent 36%),
        rgba(6, 9, 14, 0.88);
}

.settle-flow-head {
    margin-bottom: 1.1rem;
}

.settle-flow-head h2 {
    margin-bottom: 0.3rem;
}

.settle-flow-head p {
    margin: 0;
    color: #a8b8d0;
    font-size: 0.88rem;
    line-height: 1.5;
}

.settle-flow-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.settle-flow-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 1rem 1rem 1.05rem;
    border: 1px solid rgba(var(--flow-rgb), 0.3);
    border-radius: 14px;
    background:
        linear-gradient(160deg, rgba(var(--flow-rgb), 0.13), rgba(12, 18, 29, 0.78) 55%),
        rgba(12, 18, 29, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.settle-flow-step:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--flow-rgb), 0.62);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35), 0 0 22px rgba(var(--flow-rgb), 0.16);
}

/* Arrow between neighbouring steps. */
.settle-flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    z-index: 1;
    top: 2.15rem;
    right: -0.82rem;
    width: 0.64rem;
    height: 0.64rem;
    border-top: 2px solid rgba(var(--flow-rgb), 0.7);
    border-right: 2px solid rgba(var(--flow-rgb), 0.7);
    transform: rotate(45deg);
}

.settle-flow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(var(--flow-rgb), 0.55);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(var(--flow-rgb), 0.3), rgba(var(--flow-rgb), 0.08));
    color: rgb(var(--flow-rgb));
    box-shadow: 0 0 18px rgba(var(--flow-rgb), 0.25);
}

.settle-flow-icon svg {
    width: 1.3rem;
    height: 1.3rem;
}

.settle-flow-num {
    color: rgb(var(--flow-rgb));
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.settle-flow-title {
    margin-top: 0.15rem;
    color: #f6f9ff;
    font-size: 1.05rem;
    font-weight: 800;
}

.settle-flow-step p {
    margin: 0.35rem 0 0.85rem;
    color: #b9c6da;
    font-size: 0.84rem;
    line-height: 1.5;
}

.settle-flow-step p strong {
    color: #ffe2bc;
}

.settle-flow-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: stretch;
    margin-top: auto;
    padding: 0.32rem 0.6rem;
    border-radius: 8px;
    background: rgba(var(--flow-rgb), 0.12);
    color: rgb(var(--flow-rgb));
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.settle-flow-chip::before {
    content: '✓';
    font-weight: 900;
}

.settle-flow-split {
    align-self: stretch;
    margin-top: auto;
}

.settle-flow-split-bar {
    display: flex;
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.settle-flow-split-bar i {
    display: block;
    height: 100%;
}

.settle-flow-split-bar .is-creator {
    width: 95%;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.45);
}

.settle-flow-split-bar .is-burn {
    width: 5%;
    background: linear-gradient(90deg, #ff8a3d, #ff4d4d);
    box-shadow: 0 0 10px rgba(255, 90, 50, 0.6);
}

.settle-flow-split-legend {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.38rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.settle-flow-split-legend .is-creator { color: #6ff09a; }
.settle-flow-split-legend .is-burn { color: #ff8a5c; }

.settle-flow-rules {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(120, 135, 164, 0.2);
}

.settle-flow-rules-title {
    display: block;
    margin-bottom: 0.65rem;
    color: #8f9fb8;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.settle-flow-rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.settle-flow-rule {
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(120, 135, 164, 0.24);
    border-left: 3px solid rgba(255, 179, 71, 0.75);
    border-radius: 10px;
    background: rgba(12, 18, 29, 0.6);
}

.settle-flow-rule.is-flash {
    border-left-color: #fde047;
    background: linear-gradient(150deg, rgba(253, 224, 71, 0.08), rgba(12, 18, 29, 0.6) 60%);
}

.settle-flow-rule strong {
    display: block;
    color: #f6f9ff;
    font-size: 0.88rem;
}

.settle-flow-rule span {
    display: block;
    margin-top: 0.22rem;
    color: #a8b8d0;
    font-size: 0.8rem;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .settle-flow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settle-flow-step:not(:last-child)::after {
        content: none;
    }
}

@media (max-width: 760px) {
    .settle-flow-steps,
    .settle-flow-rules-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settle-flow-steps {
        gap: 0.75rem;
    }

    /* Compact on phones: icon on the left, text on the right. */
    .settle-flow-step {
        display: grid;
        grid-template-columns: 2.5rem minmax(0, 1fr);
        column-gap: 0.8rem;
        align-items: start;
        padding: 0.9rem;
    }

    .settle-flow-step > :not(.settle-flow-icon) {
        grid-column: 2;
    }

    .settle-flow-icon {
        grid-column: 1;
        grid-row: 1 / span 5;
        margin-bottom: 0;
    }

    .settle-flow-step p {
        margin-bottom: 0.65rem;
    }

    /* Arrow pointing down between stacked steps, under the icon. */
    .settle-flow-step:not(:last-child)::after {
        content: '';
        top: auto;
        right: auto;
        bottom: -0.62rem;
        left: 1.83rem;
        transform: rotate(135deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .settle-flow-step {
        transition: none;
    }

    .settle-flow-step:hover {
        transform: none;
    }
}

.purchase-stream {
    display: grid;
    gap: 0.6rem;
}

.purchase-entry {
    border: 1px solid rgba(101, 116, 146, 0.42);
    border-radius: 10px;
    background: rgba(13, 18, 29, 0.82);
    overflow: hidden;
}

.purchase-entry summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    padding: 0.64rem 0.72rem;
    color: #e8efff;
    font-size: 0.9rem;
    font-weight: 700;
}

.purchase-entry summary::-webkit-details-marker {
    display: none;
}

.purchase-summary-right {
    color: #ffd6a8;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.purchase-buyer-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.purchase-raffle-link {
    color: #b8d3ff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(120, 164, 255, 0.35);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    background: rgba(80, 130, 255, 0.12);
}

.purchase-raffle-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
    border-color: rgba(156, 189, 255, 0.65);
}

.purchase-user {
    color: #ffdeba;
    font-size: 0.79rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(255, 183, 116, 0.45);
    border-radius: 999px;
    background: rgba(255, 123, 0, 0.16);
}

.purchase-user-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

.purchase-user-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.purchase-body {
    border-top: 1px solid rgba(101, 116, 146, 0.3);
    padding: 0.62rem 0.72rem;
    display: grid;
    gap: 0.45rem;
    color: #c4d0e4;
    font-size: 0.86rem;
}

.purchase-label {
    color: #9eb0cd;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.purchase-amount {
    color: #ffe4c1;
    font-weight: 700;
    margin-left: 0.25rem;
}

.purchase-link {
    color: #ffd7ad;
    text-decoration: none;
    word-break: break-all;
}

.purchase-link:hover {
    text-decoration: underline;
}

.purchase-entry summary {
    transition: background-color 0.2s ease;
}

.purchase-entry summary:hover {
    background: rgba(255, 255, 255, 0.035);
}

.purchase-entry summary:focus-visible {
    outline: 2px solid rgba(255, 215, 170, 0.85);
    outline-offset: -2px;
    border-radius: 10px;
}

.purchase-summary-right {
    white-space: nowrap;
}

.purchase-summary-right::after {
    content: '';
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-left: 0.6em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.75;
    transform: translateY(-0.22em) rotate(45deg);
    transition: transform 0.2s ease;
}

.purchase-entry[open] .purchase-summary-right::after {
    transform: translateY(0.05em) rotate(225deg);
}

.purchase-body {
    grid-template-columns: minmax(0, 1fr);
}

.purchase-body > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.purchase-more-btn {
    display: none;
    width: 100%;
    margin-top: 0.7rem;
    padding: 0.62rem 1rem;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 179, 71, 0.5);
    border-radius: 10px;
    background: rgba(255, 123, 0, 0.1);
    color: #ffd8a1;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.purchase-more-btn:hover {
    background: rgba(255, 123, 0, 0.18);
    border-color: rgba(255, 179, 71, 0.8);
}

.purchase-more-btn:focus-visible {
    outline: 2px solid rgba(255, 215, 170, 0.9);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .purchase-entry summary,
    .purchase-summary-right::after,
    .purchase-more-btn {
        transition: none;
    }
}

.raffles-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.raffles-board-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Same size, font and height for the links and the button. */
.raffles-board-actions > .players-profiles-btn,
.raffles-board-actions > .add-raffle-btn {
    box-sizing: border-box;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .raffles-board-head {
        align-items: stretch;
    }

    .raffles-board-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    /* Odd count (logged in: My Raffles, Player Profiles, Add Raffle): the last one takes the full row. */
    .raffles-board-actions > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .raffles-board-actions > .players-profiles-btn,
    .raffles-board-actions > .add-raffle-btn {
        padding: 0.6rem 0.5rem;
        font-size: 0.9rem;
    }
}

.add-raffle-btn:focus-visible {
    outline: none;
    border-color: rgba(255, 205, 130, 0.9);
    box-shadow: 0 0 0 2px rgba(255, 211, 146, 0.75), 0 0 14px rgba(255, 123, 0, 0.36);
}

.add-raffle-btn {
    border: 1px solid rgba(255, 179, 71, 0.65);
    background: linear-gradient(135deg, rgba(255, 123, 0, 0.25), rgba(255, 20, 147, 0.24));
    color: #fff6ea;
    border-radius: 11px;
    padding: 0.65rem 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.players-profiles-btn {
    border: 1px solid rgba(255, 179, 71, 0.55);
    background: rgba(255, 123, 0, 0.12);
    color: #ffe9cf;
    border-radius: 11px;
    padding: 0.62rem 0.95rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.players-profiles-btn:focus-visible {
    outline: none;
    border-color: rgba(255, 205, 130, 0.9);
    box-shadow: 0 0 0 2px rgba(255, 211, 146, 0.75), 0 0 14px rgba(255, 123, 0, 0.36);
}

.players-profiles-btn:hover {
    border-color: rgba(255, 205, 130, 0.9);
    box-shadow: 0 0 14px rgba(255, 123, 0, 0.36);
}

.add-raffle-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 204, 132, 0.95);
    box-shadow: 0 0 18px rgba(255, 123, 0, 0.42);
}

.add-raffle-btn:disabled {
    cursor: not-allowed;
    border-color: var(--raffles-disabled-btn-border);
    background: var(--raffles-disabled-btn-bg);
    color: var(--raffles-disabled-btn-color);
    box-shadow: var(--raffles-disabled-btn-shadow);
    transform: none;
    opacity: 1;
    filter: saturate(0.86);
}

.raffles-block {
    border: 1px solid rgba(120, 132, 156, 0.28);
    border-radius: 12px;
    background: rgba(7, 11, 18, 0.82);
    padding: 0.95rem;
    box-shadow: var(--raffles-main-block-shadow), var(--raffles-main-block-inset);
}

.raffles-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    color: #f6f9ff;
    font-weight: 700;
}

.raffles-block-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.raffles-count {
    min-width: 28px;
    text-align: center;
    font-size: 0.82rem;
    color: #fff3dd;
    background: rgba(255, 123, 0, 0.25);
    border: 1px solid rgba(255, 179, 71, 0.4);
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
}

/* Active Raffles reads as live (green), Ended Raffles as an archive (silver). */
.raffles-block--live {
    position: relative;
    border-color: rgba(74, 222, 128, 0.26);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(74, 222, 128, 0.07), transparent 55%),
        rgba(7, 12, 16, 0.86);
    box-shadow: var(--raffles-main-block-shadow), var(--raffles-main-block-inset), 0 0 22px rgba(74, 222, 128, 0.07);
}

.raffles-block--live::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 12%;
    right: 12%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.9) 30%, rgba(134, 239, 172, 1) 50%, rgba(74, 222, 128, 0.9) 70%, transparent);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    pointer-events: none;
}

.raffles-block--live.is-empty {
    border-color: rgba(120, 132, 156, 0.28);
    background: rgba(7, 11, 18, 0.82);
    box-shadow: var(--raffles-main-block-shadow), var(--raffles-main-block-inset);
}

.raffles-block--live.is-empty::before {
    opacity: 0.35;
    box-shadow: none;
}

.raffles-block--live .raffles-count {
    color: #dcfce7;
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(74, 222, 128, 0.5);
}

.raffles-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.14rem 0.5rem 0.14rem 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 222, 128, 0.45);
    background: rgba(22, 163, 74, 0.16);
    color: #bbf7d0;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
}

.raffles-live-dot {
    position: relative;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.85);
}

.raffles-live-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #4ade80;
    animation: rafflesLivePulse 1.8s ease-out infinite;
}

@keyframes rafflesLivePulse {
    0% { transform: scale(1); opacity: 0.75; }
    100% { transform: scale(2.8); opacity: 0; }
}

.raffles-block--live.is-empty .raffles-count {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(203, 213, 225, 0.32);
}

.raffles-block--live.is-empty .raffles-live-badge {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(100, 116, 139, 0.14);
    color: #cbd5e1;
}

.raffles-block--live.is-empty .raffles-live-dot {
    background: #94a3b8;
    box-shadow: none;
}

.raffles-block--live.is-empty .raffles-live-dot::after {
    animation: none;
    opacity: 0;
}

.raffles-block--archive {
    border-color: rgba(203, 213, 225, 0.2);
    background: rgba(4, 7, 11, 0.9);
    box-shadow: var(--raffles-main-block-shadow), inset 0 0 0 1px rgba(203, 213, 225, 0.06);
}

.raffles-block--archive .raffles-count {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(203, 213, 225, 0.32);
}

.raffles-block-subtitle {
    color: #8b95a7;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Ended cards: muted art that regains its colour on hover/focus. */
.raffles-block--archive .raffle-card[data-ended-raffle="1"] .raffle-art {
    isolation: isolate;
}

.raffles-block--archive .raffle-card[data-ended-raffle="1"] .raffle-art::before {
    background: rgb(128, 128, 128);
    mix-blend-mode: saturation;
    opacity: 0.6;
    transition: opacity 0.35s ease;
}

.raffles-block--archive .raffle-card-link:hover .raffle-card[data-ended-raffle="1"] .raffle-art::before,
.raffles-block--archive .raffle-card-link:focus-visible .raffle-card[data-ended-raffle="1"] .raffle-art::before {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .raffles-live-dot::after {
        animation: none;
        opacity: 0;
    }

    .raffles-block--archive .raffle-card[data-ended-raffle="1"] .raffle-art::before {
        transition: none;
    }
}

.raffles-list {
    display: grid;
    gap: 0.8rem;
}

.raffles-active-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.next-drop {
    grid-column: 1 / -1;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: center;
    padding: 1.5rem 1.6rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 179, 71, 0.42);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255, 123, 0, 0.16), transparent 55%),
        radial-gradient(120% 140% at 100% 100%, rgba(255, 20, 147, 0.14), transparent 55%),
        linear-gradient(160deg, rgba(15, 20, 30, 0.98), rgba(10, 13, 20, 0.98));
    box-shadow: var(--raffles-main-block-shadow), var(--raffles-main-block-inset);
}

.next-drop > * {
    min-width: 0;
}

.next-drop-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #ffb347;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.next-drop-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff7b00;
    box-shadow: 0 0 0 0 rgba(255, 123, 0, 0.7);
    animation: nextDropPulse 1.8s ease-out infinite;
}

@keyframes nextDropPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 123, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 123, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 123, 0, 0); }
}

.next-drop-title {
    margin: 0.55rem 0 0.4rem;
    color: #ffffff;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 900;
    line-height: 1.2;
}

.next-drop-text {
    margin: 0;
    color: #d9dde6;
    font-size: 0.98rem;
    line-height: 1.55;
    max-width: 46ch;
}

.next-drop-actions {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.next-drop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.55rem 1rem;
    border-radius: 11px;
    border: 1px solid rgba(255, 179, 71, 0.55);
    background: rgba(255, 123, 0, 0.1);
    color: #fff6ea;
    font: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.next-drop-btn.discord {
    background: #5865f2;
    border-color: #7983f5;
}

.next-drop-btn.x {
    background: #0b0d12;
    border-color: rgba(255, 255, 255, 0.35);
}

.next-drop-btn:hover,
.next-drop-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 204, 132, 0.95);
    box-shadow: 0 0 16px rgba(255, 123, 0, 0.4);
    outline: none;
}

.next-drop-winners {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
}

.next-drop-winners-title {
    color: #ffca8f;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.next-drop-winner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(117, 133, 164, 0.32);
    background: rgba(7, 10, 15, 0.7);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.next-drop-winner:hover,
.next-drop-winner:focus-visible {
    border-color: rgba(255, 179, 71, 0.62);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.32);
    outline: none;
}

.next-drop-winner-art {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 123, 0, 0.25), rgba(255, 20, 147, 0.2));
    border: 1px solid rgba(255, 179, 71, 0.3);
}

.next-drop-winner-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.next-drop-winner-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.next-drop-winner-name {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-drop-winner-meta {
    color: #b9c0cc;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-drop-winner-meta strong {
    color: #ffe9cf;
}

@media (prefers-reduced-motion: reduce) {
    .next-drop-pulse {
        animation: none;
    }
}

.raffle-card {
    border: 1px solid rgba(117, 133, 164, 0.38);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(15, 20, 30, 0.98), rgba(10, 13, 20, 0.98));
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.raffle-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.raffle-card-link.ending-move-out {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
    transition: opacity 180ms ease, transform 220ms ease;
    pointer-events: none;
}

.raffle-card-link.ending-move-in {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
}

.raffle-card-link.ending-move-in.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 240ms ease, transform 280ms ease;
}

.raffle-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 179, 71, 0.62);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36);
}

/* NFT art is square: show it whole (no cropped faces). */
.raffle-art {
    position: relative;
    aspect-ratio: 1 / 1;
    background-image:
        linear-gradient(0deg, rgba(6, 9, 16, 0.22), rgba(6, 9, 16, 0.22)),
        var(--raffle-art-image, linear-gradient(135deg, rgba(126, 34, 206, 0.52), rgba(255, 123, 0, 0.56)));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 0.65rem;
}

.raffle-art::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.2), transparent 45%);
    pointer-events: none;
}

.raffle-status {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    border: 1px solid transparent;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 1.0), 0 3px 6px rgba(0, 0, 0, 0.75);
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.9);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
}

.raffle-status.active {
    color: #f5ebff;
    background: rgba(0, 170, 0, 0.6);
    border-color: rgba(0, 170, 0, 0.7);
}

.raffle-status.ending {
    color: #f5ebff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(249, 115, 22, 0.93));
    border-color: rgba(251, 191, 36, 0.95);
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.9), 0 0 18px rgba(249, 115, 22, 0.46);
}

.raffle-status.ended {
    color: #f5ebff;
    background: rgba(170, 0, 0, 0.6);
    border-color: rgba(170, 0, 0, 0.7);
}

.raffle-status.settled {
    color: #f5ebff;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.92), rgba(139, 92, 246, 0.88));
    border-color: rgba(196, 181, 253, 0.88);
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.9), 0 0 16px rgba(124, 58, 237, 0.38);
}

.raffle-likes-pill {
    position: absolute;
    top: 0.5rem;
    right: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    color: #d5d9e2;
    background: rgba(20, 14, 20, 0.64);
    border: 1px solid rgba(255, 120, 120, 0.34);
    border-radius: 999px;
    padding: 0.16rem 0.42rem;
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.raffle-likes-pill:focus-visible {
    outline: 2px solid rgba(255, 167, 167, 0.88);
    outline-offset: 1px;
}

.raffle-likes-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 142, 142, 0.52);
    background: rgba(28, 18, 24, 0.76);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

.raffle-likes-pill.zero {
    color: #d5d9e2;
    border-color: rgba(146, 157, 180, 0.34);
    background: rgba(17, 20, 29, 0.62);
}

.raffle-likes-heart {
    color: #9ca7ba;
    font-size: 0.68rem;
    transform: translateY(-0.02rem);
    transition: color 0.18s ease, filter 0.18s ease;
}

.raffle-likes-pill.liked {
    color: #ffd7d7;
    border-color: rgba(255, 110, 110, 0.56);
    background: rgba(42, 12, 16, 0.74);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.72), 0 0 14px rgba(225, 20, 36, 0.24);
}

.raffle-likes-pill.liked .raffle-likes-heart {
    color: #ff3b3b;
    filter: drop-shadow(0 0 4px rgba(255, 45, 45, 0.52));
}

.raffle-likes-pill.like-pop {
    animation: raffleLikePillPop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.raffle-likes-pill.like-pop .raffle-likes-heart {
    animation: raffleLikeHeartPop 0.32s cubic-bezier(0.18, 0.88, 0.25, 1.08);
}

@keyframes raffleLikePillPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@keyframes raffleLikeHeartPop {
    0% { transform: translateY(-0.02rem) scale(1); }
    40% { transform: translateY(-0.04rem) scale(1.26); }
    100% { transform: translateY(-0.02rem) scale(1); }
}

.raffle-likes-pill.locked {
    cursor: default;
    opacity: 0.9;
}

.raffle-likes-pill.locked:hover {
    transform: none;
}

.raffle-likes-value {
    min-width: 0.52rem;
    text-align: right;
}

.raffle-my-tickets-pill {
    position: absolute;
    top: 0.5rem;
    left: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    color: #e6f0ff;
    background: linear-gradient(135deg, rgba(18, 34, 74, 0.88), rgba(74, 45, 130, 0.86));
    border: 1px solid rgba(134, 188, 255, 0.55);
    border-radius: 999px;
    padding: 0.16rem 0.42rem;
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.62), 0 0 12px rgba(116, 99, 255, 0.28);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    user-select: none;
}

.raffle-my-tickets-pill.hidden {
    display: none;
}

.raffle-my-tickets-icon {
    font-size: 0.68rem;
    transform: translateY(-0.02rem);
    filter: drop-shadow(0 0 3px rgba(76, 208, 255, 0.45));
}

.raffle-my-tickets-value {
    min-width: 0.52rem;
    text-align: right;
}

.raffle-unique-wallets-pill {
    position: absolute;
    bottom: 0.5rem;
    right: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    color: #edf5ff;
    background: linear-gradient(135deg, rgba(18, 22, 46, 0.88), rgba(52, 44, 88, 0.86));
    border: 1px solid rgba(189, 212, 255, 0.48);
    border-radius: 999px;
    padding: 0.16rem 0.42rem;
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.62), 0 0 12px rgba(130, 170, 255, 0.22);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    user-select: none;
}

.raffle-unique-wallets-icon {
    font-size: 0.68rem;
    transform: translateY(-0.02rem);
    filter: drop-shadow(0 0 3px rgba(164, 203, 255, 0.46));
}

.raffle-unique-wallets-value {
    min-width: 0.52rem;
    text-align: right;
}

.raffle-body {
    padding: 0.78rem 0.8rem 0.9rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.raffle-body.sold-out-surface {
    background-image:
        linear-gradient(180deg, rgba(10, 14, 24, 0.75) 0%, rgba(10, 14, 24, 0.75) 100%),
        url('/static/img/raffles/sold_out.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0 0 16px 16px;
}

.raffle-name {
    color: #f8fbff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.32rem;
}

.raffle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    margin-bottom: 0.62rem;
    color: #c5d0e5;
    font-size: 0.86rem;
}
.raffle-winner-handle {
    color: #ffcc7a;
    font-weight: 800;
}
.raffle-creator-handle {
    color: #8ddcff;
    font-weight: 800;
}

.raffle-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.raffle-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff8c00 0%, #ff1493 100%);
    transition: width 0.8s ease, filter 0.35s ease, box-shadow 0.35s ease;
}

.raffle-progress-fill.hot {
    filter: saturate(1.2);
    box-shadow: 0 0 8px rgba(255, 141, 54, 0.45);
}

.raffle-progress-fill.on-fire {
    filter: saturate(1.4) brightness(1.08);
    box-shadow: 0 0 14px rgba(255, 86, 34, 0.62);
}

.raffle-progress-fill.inferno {
    filter: saturate(1.55) brightness(1.15);
    box-shadow: 0 0 18px rgba(255, 40, 110, 0.7);
    background: linear-gradient(90deg, #ff8c00 0%, #ff4d00 45%, #ff1493 100%);
    animation: infernoProgressPulse 1.45s ease-in-out infinite;
}

.raffle-time-track {
    margin-top: 0.35rem;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.raffle-time-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 193, 126, 0.9), rgba(255, 88, 88, 0.95));
    transition: width 1s linear;
}

.raffle-card.on-fire {
    border-color: rgba(255, 153, 72, 0.72);
    box-shadow: 0 10px 22px rgba(255, 123, 0, 0.24);
}

.raffle-card.inferno {
    border-color: rgba(255, 87, 87, 0.9);
    box-shadow: 0 14px 30px rgba(255, 64, 64, 0.34);
    animation: infernoCardPulse 1.8s ease-in-out infinite;
}

@keyframes infernoCardPulse {
    0%, 100% {
        box-shadow: 0 14px 30px rgba(255, 64, 64, 0.3);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 16px 36px rgba(255, 64, 64, 0.46);
        transform: translateY(-1px);
    }
}

/* Flash raffles: same grid as Active Raffles, with an electric frame. */
@property --flash-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.raffle-card.is-flash {
    position: relative;
    border: 1px solid transparent;
    background:
        linear-gradient(160deg, rgba(22, 20, 10, 0.98), rgba(10, 13, 20, 0.98)) padding-box,
        conic-gradient(
            from var(--flash-angle),
            rgba(250, 204, 21, 0.95),
            rgba(125, 211, 252, 0.6),
            rgba(250, 204, 21, 0.18),
            rgba(253, 230, 138, 0.92),
            rgba(125, 211, 252, 0.6),
            rgba(250, 204, 21, 0.95)
        ) border-box;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.1), 0 10px 26px rgba(250, 204, 21, 0.14);
    animation: flashFrameSpin 7s linear infinite;
}

.raffle-card.is-flash:hover {
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.22), 0 16px 34px rgba(250, 204, 21, 0.24);
}

.raffle-card.is-flash.on-fire,
.raffle-card.is-flash.inferno {
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.24), 0 14px 32px rgba(250, 204, 21, 0.3);
    animation: flashFrameSpin 3.5s linear infinite;
}

.raffle-card-link:focus-visible {
    outline: none;
}

.raffle-card-link:focus-visible .raffle-card {
    box-shadow: 0 0 0 2px rgba(255, 179, 71, 0.9), 0 14px 28px rgba(0, 0, 0, 0.36);
}

.raffle-card-link.is-flash:focus-visible .raffle-card {
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.95), 0 16px 34px rgba(250, 204, 21, 0.28);
}

.raffle-card.is-flash .raffle-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 248, 214, 0.32) 50%, transparent 62%);
    background-size: 250% 100%;
    background-position: 160% 0;
    animation: flashArtSweep 5.5s ease-in-out infinite;
    pointer-events: none;
}

.raffle-flash-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    margin-left: 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.28rem 0.62rem 0.28rem 0.5rem;
    color: #1c1504;
    background: linear-gradient(135deg, #fef08a 0%, #facc15 55%, #f59e0b 100%);
    border: 1px solid rgba(254, 240, 138, 0.95);
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.9), 0 0 16px rgba(250, 204, 21, 0.45);
}

.raffle-flash-bolt {
    display: inline-flex;
    animation: flashBoltFlicker 3.2s ease-in-out infinite;
}

.raffle-flash-bolt .flash-bolt-icon {
    display: block;
}

.raffle-time-track + .raffle-foot {
    padding-top: 0.5rem;
}

.raffle-flash-rules {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.4rem;
    margin: -0.08rem 0 0.42rem;
    color: #fde68a;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.raffle-flash-rules > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.raffle-flash-rules.is-milestone {
    justify-content: flex-end;
    min-height: 0;
}

/* A hidden milestone must not leave an empty yellow capsule or gap. */
.raffle-flash-rules[hidden] {
    display: none !important;
}

.raffle-flash-milestone {
    flex: none;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
    color: #fef9c3;
    background: rgba(250, 204, 21, 0.14);
    border: 1px solid rgba(250, 204, 21, 0.42);
}

.raffle-flash-milestone.urgent {
    color: #fff1f2;
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(251, 113, 133, 0.62);
    animation: flashChipPulse 1.6s ease-in-out infinite;
}

.raffle-card.is-flash .raffle-live-countdown {
    color: #fef08a;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.raffle-card.is-flash .raffle-progress-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #facc15 55%, #fef9c3 100%);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}

.raffle-card.is-flash .raffle-progress-fill.inferno {
    background: linear-gradient(90deg, #f59e0b 0%, #facc15 45%, #ffffff 100%);
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.75);
    animation: none;
}

@keyframes flashFrameSpin {
    to { --flash-angle: 360deg; }
}

@keyframes flashArtSweep {
    0%, 55% { background-position: 160% 0; }
    85%, 100% { background-position: -60% 0; }
}

@keyframes flashBoltFlicker {
    0%, 86%, 100% { opacity: 1; transform: scale(1); }
    89% { opacity: 0.35; transform: scale(0.92); }
    92% { opacity: 1; transform: scale(1.12); }
    95% { opacity: 0.6; }
}

@keyframes flashChipPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(244, 63, 94, 0); }
    50% { box-shadow: 0 0 12px rgba(244, 63, 94, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
    .raffle-card.is-flash,
    .raffle-card.is-flash.on-fire,
    .raffle-card.is-flash.inferno,
    .raffle-card.is-flash .raffle-art::after,
    .raffle-flash-bolt,
    .raffle-flash-milestone.urgent {
        animation: none;
    }
}

@keyframes infernoProgressPulse {
    0%, 100% {
        filter: saturate(1.5) brightness(1.12);
        box-shadow: 0 0 14px rgba(255, 40, 110, 0.52);
    }
    50% {
        filter: saturate(1.7) brightness(1.24);
        box-shadow: 0 0 20px rgba(255, 40, 110, 0.74);
    }
}

.raffle-live-countdown {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1),
                 0 4px 8px rgba(0, 0, 0, 0.95),
                 0 6px 12px rgba(0, 0, 0, 0.9),
                 0 8px 16px rgba(0, 0, 0, 0.85),
                 0 10px 20px rgba(0, 0, 0, 0.8);
}

.raffle-live-countdown.warning {
    color: #ffc68f;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1),
                 0 4px 8px rgba(0, 0, 0, 0.95),
                 0 6px 12px rgba(0, 0, 0, 0.9),
                 0 8px 16px rgba(0, 0, 0, 0.85),
                 0 10px 20px rgba(0, 0, 0, 0.8);
}

.raffle-live-countdown.critical {
    color: #aa0000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1),
                 0 4px 8px rgba(0, 0, 0, 0.95),
                 0 6px 12px rgba(0, 0, 0, 0.9),
                 0 8px 16px rgba(0, 0, 0, 0.85),
                 0 10px 20px rgba(0, 0, 0, 0.8);
}

.raffle-foot {
    margin-top: 0.64rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.84rem;
    color: #c4cfdf;
    margin-top: auto;
}

.raffle-foot strong {
    color: #ffe2b8;
}

/* Arrows beside the cards on desktop; on mobile the cards take the full
   width and the arrows sit on both sides of the dots (see max-width: 760px). */
.ended-carousel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "prev view next"
        ". dots .";
    gap: 0.5rem 0.65rem;
    align-items: center;
}

#ended-raffles-prev { grid-area: prev; }
#ended-raffles-next { grid-area: next; }
.ended-carousel > .ended-viewport { grid-area: view; }
.ended-carousel > .ended-dots { grid-area: dots; }

.ended-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 179, 71, 0.5);
    background: rgba(255, 123, 0, 0.2);
    color: #ffe8cc;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ended-nav-btn:focus-visible {
    outline: 2px solid rgba(255, 215, 170, 0.9);
    outline-offset: 2px;
}

.ended-nav-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 205, 130, 0.9);
    box-shadow: 0 0 14px rgba(255, 140, 0, 0.35);
}

.ended-nav-btn:disabled {
    cursor: not-allowed;
    border-color: var(--raffles-disabled-btn-border);
    background: var(--raffles-disabled-btn-bg);
    color: var(--raffles-disabled-btn-color);
    box-shadow: var(--raffles-disabled-btn-shadow);
    transform: none;
    opacity: 1;
    filter: saturate(0.9);
}

.ended-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.ended-viewport::-webkit-scrollbar {
    display: none;
}

.ended-track {
    display: flex;
    gap: 0.8rem;
    flex-wrap: nowrap;
    --ended-cards-per-page: 4;
}

.ended-track > .raffle-card-link,
.ended-track > .raffle-card {
    flex: 0 0 calc((100% - (0.8rem * (var(--ended-cards-per-page) - 1))) / var(--ended-cards-per-page));
    min-width: calc((100% - (0.8rem * (var(--ended-cards-per-page) - 1))) / var(--ended-cards-per-page));
    scroll-snap-align: start;
}

.ended-track > .raffle-card-link .raffle-card {
    height: 100%;
}

.ended-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    min-width: 0;
}

/* The button is the tap area (20x32); the visible dot is ::before. */
.ended-dot {
    position: relative;
    flex: 0 1 20px;
    width: 20px;
    min-width: 14px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.ended-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 179, 71, 0.52);
    background: rgba(255, 255, 255, 0.16);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ended-dot:hover::before {
    border-color: rgba(255, 205, 130, 0.9);
    background: rgba(255, 255, 255, 0.3);
}

.ended-dot:focus-visible {
    outline: 2px solid rgba(255, 215, 170, 0.9);
    outline-offset: -2px;
}

.ended-dot.active::before {
    background: linear-gradient(90deg, #ff8c00 0%, #ff1493 100%);
    border-color: rgba(255, 211, 146, 0.95);
    transform: translate(-50%, -50%) scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
    .ended-dot::before,
    .ended-nav-btn {
        transition: none;
    }

    .ended-viewport {
        scroll-behavior: auto;
    }
}

.ended-history-direct-wrap {
    margin-top: 0.76rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.ended-history-direct-wrap.hidden {
    display: none;
}

.ended-history-direct-link {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    text-decoration: none;
    border: 1px solid rgba(255, 183, 116, 0.62);
    border-radius: 999px;
    background: rgba(15, 21, 34, 0.92);
    color: #ffe3bf;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.46rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ended-history-direct-link:hover {
    border-color: rgba(255, 205, 130, 0.95);
    box-shadow: 0 0 14px rgba(255, 128, 0, 0.42), 0 0 24px rgba(255, 94, 0, 0.2);
    transform: translateY(-1px);
}

.ended-history-direct-link:focus-visible {
    outline: 2px solid rgba(255, 215, 170, 0.9);
    outline-offset: 2px;
}

.raffle-history-teaser {
    border: 1px dashed rgba(255, 195, 130, 0.55);
    background: linear-gradient(155deg, rgba(24, 21, 34, 0.96), rgba(12, 15, 22, 0.98));
}

.raffle-history-teaser .raffle-status {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    padding: 0.24rem 0.5rem;
}

.raffle-history-teaser .raffle-name {
    color: #ffe1bd;
}

.raffle-history-teaser .raffle-meta {
    color: #d7deee;
}

.raffle-history-teaser .raffle-foot {
    color: #ffd7ad;
}

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

    .ended-track {
        --ended-cards-per-page: 3;
    }
}

@media (max-width: 980px) {
    .ended-track {
        --ended-cards-per-page: 2;
    }
}

@media (max-width: 760px) {
    .raffles-active-grid {
        grid-template-columns: 1fr;
    }

    .ended-carousel {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        grid-template-areas:
            "view view view"
            "prev dots next";
        row-gap: 0.7rem;
        column-gap: 0.4rem;
    }

    .ended-nav-btn {
        width: 44px;
        height: 44px;
    }

    .ended-track {
        --ended-cards-per-page: 1;
    }
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.8rem;
}

.policy-card {
    background: rgba(12, 16, 23, 0.9);
    border: 1px solid rgba(113, 123, 143, 0.35);
    border-radius: 12px;
    padding: 0.9rem;
    box-shadow: var(--raffles-main-block-shadow), var(--raffles-main-block-inset);
}

.policy-card > strong {
    display: block;
    color: #ffd8a1;
    margin-bottom: 0.28rem;
}

.policy-card span {
    color: #c5cfde;
    font-size: 0.94rem;
    line-height: 1.5;
}

.policy-card span strong {
    display: inline;
    color: #ffd8a1;
    margin: 0;
    font-weight: 700;
}

.policy-card span a {
    color: #8be0ff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.policy-card span a:hover {
    color: #c8f3ff;
}

.notice {
    margin-top: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.42);
    border-radius: 10px;
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
}

.raffles-terms-link-wrap {
    margin-top: 0.95rem;
    text-align: center;
}

.raffles-terms-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffd8a1;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.raffles-terms-link:hover {
    color: #ffe9cc;
}

.raffle-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.raffle-modal.open {
    display: flex;
}

.raffle-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 12, 0.76);
    backdrop-filter: blur(6px);
}

.raffle-modal-panel {
    position: relative;
    width: min(760px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 179, 71, 0.4);
    background: linear-gradient(165deg, rgba(12, 17, 28, 0.98), rgba(8, 11, 20, 0.97));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.raffle-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(103, 119, 148, 0.32);
}

.raffle-modal-head h3 {
    margin: 0;
    color: #fff4e2;
    font-size: 1.06rem;
}

.raffle-modal-close {
    border: 1px solid rgba(255, 179, 71, 0.45);
    background: rgba(255, 123, 0, 0.18);
    color: #ffe9ce;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.raffle-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.9rem 1rem 0;
}

.raffle-step {
    border: 1px solid rgba(108, 124, 153, 0.32);
    border-radius: 10px;
    padding: 0.52rem 0.62rem;
    color: #b8c5dc;
    font-size: 0.84rem;
    text-align: center;
}

.raffle-step.active {
    border-color: rgba(255, 179, 71, 0.72);
    color: #fff3de;
    background: rgba(255, 123, 0, 0.16);
}

.raffle-modal-body {
    padding: 0.9rem 1rem;
}

.raffle-pane {
    display: none;
}

.raffle-pane.active {
    display: block;
}

.raffle-pane h4 {
    margin: 0 0 0.75rem;
    color: #f8fbff;
}

.raffle-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.raffle-mode-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 0 0 0.85rem;
}

.raffle-mode-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.raffle-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.raffle-mode-card {
    display: grid;
    align-content: start;
    gap: 0.15rem;
    height: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(103, 118, 146, 0.4);
    border-radius: 12px;
    background: rgba(15, 21, 34, 0.86);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.raffle-mode-title {
    color: #f1f5ff;
    font-weight: 800;
    font-size: 0.95rem;
}

.raffle-mode-text {
    color: #aebbd3;
    font-size: 0.8rem;
    line-height: 1.35;
}

.raffle-mode-option:hover .raffle-mode-card {
    border-color: rgba(255, 179, 71, 0.55);
}

.raffle-mode-option input:focus-visible + .raffle-mode-card {
    box-shadow: 0 0 0 2px rgba(255, 179, 71, 0.85);
}

.raffle-mode-option input:checked + .raffle-mode-card {
    border-color: rgba(255, 179, 71, 0.85);
    background: rgba(255, 123, 0, 0.14);
}

.raffle-mode-option.flash .raffle-mode-title {
    color: #fde68a;
}

.raffle-mode-option.flash:hover .raffle-mode-card {
    border-color: rgba(250, 204, 21, 0.6);
}

.raffle-mode-option.flash input:focus-visible + .raffle-mode-card {
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.9);
}

.raffle-mode-option.flash input:checked + .raffle-mode-card {
    border-color: rgba(250, 204, 21, 0.9);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.16), rgba(125, 211, 252, 0.06));
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.2);
}

@media (max-width: 480px) {
    .raffle-mode-picker {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .raffle-mode-card {
        padding: 0.55rem 0.75rem;
    }
}

.raffle-review-tag.flash {
    color: #1c1504;
    background: linear-gradient(135deg, #fef08a, #facc15);
    border-color: rgba(254, 240, 138, 0.95);
}

.raffle-field {
    display: grid;
    gap: 0.35rem;
}

.raffle-field[hidden] {
    display: none;
}

.raffle-field.full {
    grid-column: 1 / -1;
}

.raffle-field label {
    color: #c8d3e8;
    font-size: 0.84rem;
}

.raffle-field input,
.raffle-field select,
.raffle-field textarea {
    width: 100%;
    border: 1px solid rgba(103, 118, 146, 0.4);
    border-radius: 10px;
    background: rgba(15, 21, 34, 0.86);
    color: #eef3ff;
    padding: 0.6rem 0.7rem;
    font: inherit;
}

.raffle-field select:disabled {
    color: #e7c78f;
    border-color: rgba(214, 165, 90, 0.46);
    background: rgba(29, 22, 10, 0.44);
    cursor: not-allowed;
    opacity: 1;
}

.raffle-field input[readonly] {
    color: #e7c78f;
    border-color: rgba(214, 165, 90, 0.46);
    background: rgba(29, 22, 10, 0.44);
    cursor: not-allowed;
}

.raffle-field input[readonly]::placeholder {
    color: rgba(231, 199, 143, 0.62);
}

.raffle-field input[readonly][type="datetime-local"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.raffle-field input[readonly][type="datetime-local"] {
    pointer-events: none;
}

.raffle-check {
    margin-top: 0.5rem;
    color: #c8d3e8;
    font-size: 0.9rem;
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
}

.raffle-check input[type="checkbox"] {
    margin-top: 0.16rem;
    flex: 0 0 auto;
}

.raffle-check span {
    display: block;
    line-height: 1.45;
}

.raffle-check a {
    color: #ffd28f;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.raffle-check a:hover {
    color: #ffe3ba;
}

.raffle-terms-panel {
    width: min(720px, calc(100vw - 2rem));
    max-height: min(80vh, 760px);
    overflow: hidden;
}

.raffle-terms-content {
    max-height: calc(min(80vh, 760px) - 130px);
    overflow-y: auto;
    padding-right: 0.2rem;
    color: #d6def0;
    font-size: 0.86rem;
    line-height: 1.55;
}

.raffle-terms-content h5 {
    margin: 0.75rem 0 0.35rem;
    color: #ffe2b6;
    font-size: 0.9rem;
    font-weight: 800;
}

.raffle-terms-content p,
.raffle-terms-content li {
    margin: 0;
}

.raffle-terms-content ul {
    margin: 0.28rem 0 0.55rem 1rem;
    padding: 0;
}

.raffle-terms-content a {
    color: #ffd28f;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}

.raffle-terms-content a:hover {
    color: #ffe7c2;
}

.raffle-summary {
    border: 1px solid rgba(108, 123, 150, 0.35);
    border-radius: 10px;
    background: rgba(13, 18, 29, 0.84);
    padding: 0.75rem;
    color: #d5deee;
    font-size: 0.9rem;
    line-height: 1.6;
}

.raffle-review {
    --rv-payout: #6fe3a5;
    --rv-burn: #ff8f6b;
    --rv-fee: #ffcf73;
    --rv-time: #7fc8ff;
    --rv-lock: #c3a8ff;
    display: grid;
    gap: 0.65rem;
    line-height: 1.5;
}

.raffle-review-group {
    --rv-accent: var(--rv-payout);
    border-left: 3px solid var(--rv-accent);
    background: linear-gradient(90deg, color-mix(in srgb, var(--rv-accent) 9%, transparent), transparent 70%);
    border-radius: 0 8px 8px 0;
    padding: 0.4rem 0.6rem 0.45rem 0.7rem;
}

.raffle-review-group[data-tone="fee"] { --rv-accent: var(--rv-fee); }
.raffle-review-group[data-tone="time"] { --rv-accent: var(--rv-time); }
.raffle-review-group[data-tone="lock"] { --rv-accent: var(--rv-lock); }

.raffle-review-title {
    color: var(--rv-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.raffle-review-row + .raffle-review-row,
.raffle-review-breakdown + .raffle-review-row {
    margin-top: 0.2rem;
}

.raffle-review-breakdown {
    margin: 0.35rem 0 0.4rem;
    max-width: 360px;
    border: 1px solid color-mix(in srgb, var(--rv-accent) 28%, transparent);
    border-radius: 8px;
    padding: 0.3rem 0.55rem;
    background: rgba(8, 12, 20, 0.55);
    font-variant-numeric: tabular-nums;
}

.raffle-review-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: #c4d0e8;
}

.raffle-review-line[hidden] {
    display: none;
}

.raffle-review-line.total {
    margin-top: 0.2rem;
    padding-top: 0.25rem;
    border-top: 1px dashed color-mix(in srgb, var(--rv-accent) 35%, transparent);
    color: #f1f5ff;
    font-weight: 700;
}

.raffle-review-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: 0.1em;
    color: #9eb0cf;
    border: 1px solid rgba(158, 176, 207, 0.35);
}

.raffle-review-tag.extended {
    color: var(--rv-fee);
    border-color: color-mix(in srgb, var(--rv-fee) 55%, transparent);
}

.raffle-review strong { color: #f1f5ff; }
.raffle-review strong.rv-payout { color: var(--rv-payout); }
.raffle-review strong.rv-burn { color: var(--rv-burn); }
.raffle-review strong.rv-fee { color: var(--rv-fee); }
.raffle-review strong.rv-time { color: var(--rv-time); }
.raffle-review strong.rv-lock { color: var(--rv-lock); }

.raffle-wallet-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.raffle-mini-btn {
    border: 1px solid rgba(255, 179, 71, 0.45);
    background: rgba(255, 123, 0, 0.18);
    color: #ffe9ce;
    border-radius: 9px;
    padding: 0.48rem 0.72rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.raffle-mini-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.raffle-mini-btn.disconnect {
    border-color: rgba(255, 86, 106, 0.62);
    background: rgba(255, 74, 96, 0.24);
    color: #ffe7eb;
}

.raffle-field-note {
    color: #b8c6de;
    font-size: 0.82rem;
}

.raffle-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-bottom: 0.25rem;
}

.raffle-char-counter {
    font-size: 0.78rem;
    color: #8fa7c7;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.raffle-allowlist-trigger {
    border: none;
    background: transparent;
    color: #ffd8a1;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(255, 216, 161, 0.65);
    cursor: pointer;
    padding: 0;
}

.raffle-allowlist-trigger:hover {
    color: #ffe9cc;
    text-decoration-color: rgba(255, 233, 204, 0.9);
}

.raffle-allowlist-info {
    margin-top: 0.25rem;
    margin-bottom: 0.55rem;
    color: #9eb0cf;
    font-size: 0.76rem;
}

.raffle-allowlist-list {
    margin-top: 0.6rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(108, 123, 150, 0.35);
    border-radius: 10px;
    background: rgba(13, 18, 29, 0.84);
    max-height: 250px;
    overflow-y: auto;
    padding: 0.55rem;
}

.raffle-allowlist-empty {
    color: #b8c6de;
    font-size: 0.84rem;
}

.raffle-allowlist-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: rgba(22, 30, 46, 0.9);
    border: 1px solid rgba(108, 123, 150, 0.24);
}

.raffle-allowlist-item + .raffle-allowlist-item {
    margin-top: 0.4rem;
}

.raffle-allowlist-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(10, 14, 22, 0.7);
    border: 1px solid rgba(255, 179, 71, 0.3);
}

.raffle-allowlist-body {
    flex: 1;
    min-width: 0;
}

.raffle-allowlist-item-name {
    color: #edf3ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.raffle-step2-nft-preview {
    margin: 0.2rem 0 0.6rem;
    width: 96px;
    height: 96px;
    border-radius: 10px;
    border: 1px solid rgba(255, 179, 71, 0.45);
    overflow: hidden;
    background: rgba(10, 14, 22, 0.7);
    display: none;
}

.raffle-step2-nft-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#raffle-step2-pricing-reference {
    margin-bottom: 0.8rem;
}

.raffle-pricing-insights {
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(108, 123, 150, 0.36);
    border-radius: 10px;
    background: rgba(15, 21, 34, 0.52);
    display: grid;
    gap: 0.35rem;
}

.raffle-pricing-section {
    margin-top: 0.15rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(103, 119, 148, 0.28);
}

.raffle-pricing-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.raffle-pricing-section-title {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: #ffc98c;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.raffle-optional-tag {
    color: #8fa1c1;
    font-weight: 500;
    font-size: 0.85em;
}

.raffle-pricing-trait {
    color: #ffd27a;
    font-weight: 700;
}

.raffle-review-group[data-tone="market"] { --rv-accent: var(--rv-time); }
.raffle-review-group[data-tone="recommended"] { --rv-accent: var(--rv-lock); }
.raffle-review-group[data-tone="ok"] { --rv-accent: var(--rv-payout); }
.raffle-review-group[data-tone="warn"] { --rv-accent: var(--rv-fee); }
.raffle-review-group[data-tone="blocked"] { --rv-accent: var(--rv-burn); }

.raffle-pricing-insights.raffle-review {
    gap: 0.55rem;
}

.raffle-pricing-kv {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.8rem;
    font-size: 0.83rem;
    line-height: 1.45;
    color: #b9c6dd;
    font-variant-numeric: tabular-nums;
}

.raffle-pricing-kv strong {
    text-align: right;
    color: #f1f5ff;
}

.raffle-review strong.rv-accent { color: var(--rv-accent); }

.raffle-pricing-approx {
    color: #8fa1c1;
    font-weight: 500;
}

.raffle-pricing-note {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #9eb0cf;
}

.raffle-pricing-note.is-error {
    color: var(--rv-burn);
}

.raffle-pricing-status {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rv-accent);
}

.raffle-pricing-retry {
    margin-top: 0.4rem;
}

.raffle-pricing-line {
    font-size: 0.83rem;
    color: #d4dced;
    line-height: 1.35;
}

.raffle-pricing-line strong {
    color: #f0f4ff;
}

.raffle-pricing-positive {
    color: #7ef3a2;
}

.raffle-pricing-negative {
    color: #ff9aa7;
}

.raffle-pricing-neutral {
    color: #c4d0e8;
}

.raffle-collection-search {
    width: 100%;
    margin-bottom: 0.5rem;
}

.raffle-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.raffle-collection-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    border: 1px solid rgba(108, 123, 150, 0.36);
    background: rgba(18, 26, 42, 0.92);
    color: #edf3ff;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.raffle-collection-tile:hover,
.raffle-collection-tile:focus-visible {
    border-color: rgba(255, 179, 71, 0.8);
    transform: translateY(-1px);
}

.raffle-collection-tile img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(10, 14, 22, 0.7);
    border: 1px solid rgba(255, 179, 71, 0.3);
}

.raffle-collection-empty {
    grid-column: 1 / -1;
    color: #b8c6de;
    font-size: 0.82rem;
}

.raffle-collection-selected {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 179, 71, 0.55);
    background: rgba(255, 123, 0, 0.1);
}

.raffle-collection-selected[hidden] {
    display: none;
}

.raffle-collection-selected img {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
}

.raffle-collection-selected-body {
    flex: 1;
    min-width: 0;
}

.raffle-collection-selected-name {
    color: #edf3ff;
    font-weight: 700;
}

.raffle-collection-selected-note {
    color: #9eb0cf;
    font-size: 0.74rem;
}

.raffle-eligible-grid {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.raffle-preflight-progress {
    margin-top: 0.45rem;
    border: 1px solid rgba(120, 136, 162, 0.32);
    background: rgba(10, 16, 28, 0.88);
    border-radius: 10px;
    padding: 0.5rem 0.55rem;
}

.raffle-preflight-progress[hidden] {
    display: none;
}

.raffle-preflight-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    margin-bottom: 0.32rem;
}

.raffle-preflight-progress-label {
    font-size: 0.72rem;
    color: #cbd8ef;
    font-weight: 700;
}

.raffle-preflight-progress-value {
    font-size: 0.72rem;
    color: #ffd8a1;
    font-weight: 700;
}

.raffle-preflight-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(64, 78, 104, 0.44);
}

.raffle-preflight-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffb347, #ff6b35);
    transition: width 0.18s ease;
}

.raffle-preflight-progress-note {
    margin-top: 0.3rem;
    font-size: 0.71rem;
    color: #9eb0cf;
}

.raffle-eligible-card {
    border: 1px solid rgba(108, 123, 150, 0.36);
    background: rgba(18, 26, 42, 0.92);
    border-radius: 10px;
    padding: 0.45rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.raffle-eligible-card:hover {
    border-color: rgba(255, 179, 71, 0.7);
    transform: translateY(-1px);
}

.raffle-eligible-card.active {
    border-color: rgba(255, 179, 71, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.28) inset;
}

.raffle-eligible-card.ignored {
    cursor: not-allowed;
    border-color: rgba(144, 152, 170, 0.35);
    background: rgba(18, 22, 33, 0.9);
    opacity: 0.78;
}

.raffle-eligible-card.ignored:hover {
    border-color: rgba(144, 152, 170, 0.4);
    transform: none;
}

.raffle-eligible-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: rgba(9, 14, 25, 0.8);
}

.raffle-eligible-card.ignored img {
    filter: grayscale(100%);
}

.raffle-eligible-name {
    margin-top: 0.4rem;
    color: #ecf2ff;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.raffle-eligible-collection {
    color: #afbdd6;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.raffle-ignored-wrap {
    margin-top: 0.8rem;
}

.raffle-ignored-title {
    color: #c5d0e4;
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0;
}

.raffle-ignored-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.raffle-collapse-btn {
    border: 1px solid rgba(255, 179, 71, 0.4);
    background: rgba(255, 123, 0, 0.16);
    color: #ffe3ba;
    border-radius: 8px;
    padding: 0.18rem 0.46rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.raffle-collapse-btn:hover {
    border-color: rgba(255, 179, 71, 0.75);
}

.raffle-modal-foot {
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(103, 119, 148, 0.32);
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
}

.raffle-modal-btn {
    border: 1px solid rgba(255, 179, 71, 0.48);
    border-radius: 10px;
    background: rgba(255, 123, 0, 0.18);
    color: #fff1db;
    padding: 0.6rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.raffle-modal-btn:disabled {
    cursor: not-allowed;
    border-color: var(--raffles-disabled-btn-border);
    background: var(--raffles-disabled-btn-bg);
    color: var(--raffles-disabled-btn-color);
    box-shadow: var(--raffles-disabled-btn-shadow);
    opacity: 1;
    filter: saturate(0.9);
}

.raffle-modal-btn.primary {
    background: linear-gradient(135deg, rgba(255, 123, 0, 0.44), rgba(255, 20, 147, 0.38));
    border-color: rgba(255, 205, 133, 0.78);
}

.raffle-modal-btn.primary:disabled {
    border-color: var(--raffles-disabled-btn-border);
    background: var(--raffles-disabled-btn-bg);
    color: var(--raffles-disabled-btn-color);
    box-shadow: var(--raffles-disabled-btn-shadow);
    opacity: 1;
    filter: saturate(0.9);
}

.raffle-warning-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2600;
}

.raffle-warning-modal.open {
    display: flex;
}

.raffle-warning-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.7);
    backdrop-filter: blur(1.5px);
}

.raffle-warning-panel {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100vw - 2rem));
    border-radius: 12px;
    border: 1px solid rgba(255, 149, 170, 0.5);
    background: linear-gradient(160deg, rgba(24, 15, 29, 0.98), rgba(20, 14, 30, 0.98));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
    padding: 1rem;
}

.raffle-warning-title {
    color: #ffd6de;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.raffle-warning-text {
    color: #f1d8df;
    font-size: 0.86rem;
    line-height: 1.45;
    margin-bottom: 0.85rem;
}

.raffle-warning-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
}

.raffle-notice-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2601;
}

.raffle-notice-modal.open {
    display: flex;
}

.raffle-create-success-modal .raffle-warning-panel {
    width: min(640px, calc(100vw - 2rem));
    border: 1px solid rgba(255, 206, 120, 0.72);
    background:
        radial-gradient(circle at 14% 18%, rgba(255, 201, 117, 0.28), transparent 42%),
        radial-gradient(circle at 86% 84%, rgba(76, 223, 146, 0.22), transparent 46%),
        linear-gradient(162deg, rgba(18, 14, 28, 0.98), rgba(10, 14, 24, 0.98));
    box-shadow:
        0 0 20px rgba(255, 189, 92, 0.35),
        0 0 44px rgba(50, 210, 124, 0.2),
        0 16px 42px rgba(0, 0, 0, 0.5);
    animation: raffleCreateSuccessPulse 1.15s ease-in-out infinite;
    overflow: hidden;
}

.raffle-create-success-modal .raffle-warning-panel::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -34%;
    width: 34%;
    height: 150%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 242, 203, 0.66), rgba(255, 255, 255, 0));
    transform: skewX(-20deg);
    pointer-events: none;
    animation: raffleCreateSuccessSweep 1.9s ease-out infinite;
}

.raffle-create-success-modal .raffle-warning-title {
    font-size: 1.24rem;
    line-height: 1.24;
    letter-spacing: 0.02em;
    color: #ffe6be;
    text-shadow: 0 0 16px rgba(255, 184, 83, 0.34);
    margin-bottom: 0.52rem;
}

.raffle-create-success-modal .raffle-warning-text {
    color: #f6e7cc;
    font-size: 0.96rem;
    line-height: 1.56;
    margin-bottom: 1rem;
}

.raffle-create-success-modal .raffle-warning-actions {
    justify-content: center;
}

.raffle-create-success-modal .raffle-modal-btn.primary {
    min-width: 170px;
    box-shadow: 0 0 16px rgba(62, 217, 133, 0.26), 0 0 24px rgba(255, 176, 83, 0.24);
}

.raffle-create-success-modal.flash-impact .raffle-warning-panel {
    animation: raffleCreateSuccessImpact 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.raffle-create-success-modal.flash-impact .raffle-warning-panel::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 244, 198, 0.42), rgba(255, 204, 94, 0.22) 45%, rgba(255, 255, 255, 0) 75%);
    pointer-events: none;
    animation: raffleCreateSuccessImpactGlow 280ms ease-out;
}

@keyframes raffleCreateSuccessPulse {
    0%, 100% {
        box-shadow:
            0 0 16px rgba(255, 189, 92, 0.28),
            0 0 32px rgba(50, 210, 124, 0.14),
            0 16px 42px rgba(0, 0, 0, 0.48);
    }
    50% {
        box-shadow:
            0 0 26px rgba(255, 189, 92, 0.45),
            0 0 48px rgba(50, 210, 124, 0.24),
            0 20px 48px rgba(0, 0, 0, 0.55);
    }
}

@keyframes raffleCreateSuccessSweep {
    0% {
        left: -36%;
        opacity: 0;
    }
    14% {
        opacity: 1;
    }
    100% {
        left: 124%;
        opacity: 0;
    }
}

@keyframes raffleCreateSuccessImpact {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    40% {
        transform: scale(1.026);
        filter: brightness(1.16);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes raffleCreateSuccessImpactGlow {
    0% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.raffle-ending-modal .raffle-warning-panel {
    width: min(620px, calc(100vw - 2rem));
    border-color: rgba(255, 101, 122, 0.75);
    background: linear-gradient(162deg, rgba(18, 12, 26, 0.98), rgba(8, 11, 20, 0.98));
    box-shadow: 0 0 18px rgba(255, 86, 112, 0.38), 0 0 34px rgba(255, 64, 96, 0.24);
    animation: raffleEndingPulseRed 1.15s ease-in-out infinite;
}

.raffle-ending-modal.winner .raffle-warning-panel {
    border-color: rgba(76, 223, 146, 0.92);
    box-shadow: 0 0 18px rgba(76, 223, 146, 0.4), 0 0 36px rgba(40, 199, 111, 0.28);
    animation: raffleEndingPulseGreen 1.05s ease-in-out infinite;
}

@keyframes raffleEndingPulseRed {
    0%, 100% {
        box-shadow: 0 0 14px rgba(255, 86, 112, 0.34), 0 0 28px rgba(255, 64, 96, 0.22);
    }
    50% {
        box-shadow: 0 0 26px rgba(255, 86, 112, 0.58), 0 0 46px rgba(255, 64, 96, 0.34);
    }
}

@keyframes raffleEndingPulseGreen {
    0%, 100% {
        box-shadow: 0 0 14px rgba(76, 223, 146, 0.36), 0 0 30px rgba(40, 199, 111, 0.24);
    }
    50% {
        box-shadow: 0 0 28px rgba(76, 223, 146, 0.64), 0 0 50px rgba(40, 199, 111, 0.36);
    }
}

.raffle-ending-title {
    color: #ffe4c9;
    font-size: 1.22rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.raffle-ending-subtitle {
    margin-top: 0.15rem;
    color: #ffd1a0;
    font-size: 0.9rem;
}

.raffle-ending-reel {
    margin-top: 0.72rem;
    border: 1px solid rgba(255, 168, 115, 0.44);
    border-radius: 12px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 123, 0, 0.2), rgba(10, 14, 24, 0.94));
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.85rem;
    position: relative;
    overflow: visible;
}

.raffle-ending-reel-name.winner-halo {
    color: #ffe7b3;
    background: linear-gradient(135deg, rgba(133, 94, 36, 0.26) 0%, rgba(198, 146, 57, 0.24) 36%, rgba(255, 221, 132, 0.2) 68%, rgba(255, 241, 191, 0.24) 100%);
    border: 1px solid rgba(226, 178, 86, 0.65);
    border-radius: 14px;
    padding: 0.2rem 0.8rem;
    box-shadow: 0 0 16px rgba(176, 125, 40, 0.35), 0 0 28px rgba(255, 205, 110, 0.45), 0 0 42px rgba(255, 234, 156, 0.26);
    animation: winnerNameHaloPulse 1.05s ease-in-out infinite;
    overflow: hidden;
}

.raffle-ending-reel-name.winner-shimmer::after {
    content: '';
    position: absolute;
    top: -18%;
    left: -32%;
    width: 30%;
    height: 136%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 247, 221, 0.88) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    animation: winnerShimmerSweep 1.6s ease-out 1;
    z-index: 2;
}

.raffle-ending-reel.impact {
    animation: raffleEndingImpactFlash 300ms ease-out;
}

.raffle-ending-reel-name {
    font-size: clamp(1.32rem, 4.5vw, 2rem);
    font-weight: 900;
    color: #fff2e3;
    text-shadow: 0 0 10px rgba(255, 123, 0, 0.42);
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.raffle-ending-timer {
    margin-top: 0.36rem;
    text-align: center;
    color: #ffd6a8;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    min-height: 1.2rem;
}

.raffle-ending-modal.impact-shake .raffle-warning-panel {
    animation: raffleEndingImpactShake 120ms cubic-bezier(0.36, 0, 0.66, -0.2);
}

.raffle-ending-reel-name.impact {
    animation: raffleEndingWinnerImpact 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes raffleEndingImpactFlash {
    0% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        filter: brightness(1);
    }
    35% {
        box-shadow: 0 0 22px rgba(255, 245, 224, 0.38), 0 0 38px rgba(255, 179, 71, 0.28);
        filter: brightness(1.14);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        filter: brightness(1);
    }
}

@keyframes raffleEndingWinnerImpact {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    55% {
        transform: scale(1.12);
        filter: brightness(1.18);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes raffleEndingImpactShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(7px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@keyframes winnerNameHaloPulse {
    0%, 100% {
        opacity: 0.72;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

@keyframes winnerShimmerSweep {
    0% {
        left: -34%;
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    100% {
        left: 124%;
        opacity: 0;
    }
}

.raffle-ending-note {
    margin-top: 0.54rem;
    color: #cdd8eb;
    font-size: 0.84rem;
    text-align: center;
}

.raffle-ending-winner {
    margin-top: 0.62rem;
    text-align: center;
    color: #7ff4a8;
    font-size: 1.03rem;
    font-weight: 800;
    min-height: 1.4rem;
}

@media (max-width: 760px) {
    .raffle-field-grid {
        grid-template-columns: 1fr;
    }

    .raffle-steps {
        grid-template-columns: 1fr;
    }

    .raffle-eligible-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 240px;
    }

    .next-drop {
        grid-template-columns: 1fr;
        gap: 1.1rem;
        padding: 1.1rem 1rem;
    }

    .next-drop-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .next-drop-btn {
        width: 100%;
        box-sizing: border-box;
        white-space: nowrap;
    }

    .next-drop-winner {
        gap: 0.6rem;
        padding: 0.5rem 0.55rem;
    }

    .next-drop-winner-art {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
    }

    .next-drop-winner-name,
    .next-drop-winner-meta {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .raffles-help-dot[data-tooltip]::after {
        left: 0;
        right: auto;
        transform: translateY(4px);
        width: max-content;
        max-width: min(86vw, 320px);
    }

    .raffles-help-dot[data-tooltip]:hover::after,
    .raffles-help-dot[data-tooltip]:focus-visible::after {
        transform: translateY(0);
    }

    .raffles-page {
        padding: 1rem;
    }

    .raffles-section {
        padding: 1.05rem 0.95rem;
    }

    /* Last Purchases: raffle / buyer / user + time, nothing wider than the card. */
    .purchase-entry summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.4rem 0.6rem;
        padding: 0.62rem 0.7rem;
        font-size: 0.86rem;
    }

    .purchase-buyer-tag {
        display: contents;
    }

    .purchase-raffle-link {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: start;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .purchase-buyer-line {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
    }

    .purchase-user {
        grid-column: 1;
        grid-row: 3;
        justify-self: start;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .purchase-summary-right {
        grid-column: 2;
        grid-row: 3;
        font-size: 0.7rem;
        letter-spacing: 0.02em;
    }

    .purchase-body {
        padding: 0.62rem 0.7rem;
        font-size: 0.82rem;
    }

    .purchase-stream:not(.is-expanded) > .purchase-entry:nth-child(n+6):not([open]) {
        display: none;
    }

    .purchase-more-btn {
        display: flex;
    }
}

