:root {
    --ink: #162033;
    --line: #d8e2f0;
    --brand: #1954e8;
    --accent: #00a876;
    --warn: #f5a524;
    --danger: #e5484d;
    --surface: #ffffff;
    --page: #f4f7fb;
}

.help-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(22, 32, 51, .08);
}

.help-lead {
    max-width: 760px;
    color: #44546a;
    font-size: 17px;
}

.help-role-badge {
    min-width: 180px;
    padding: 16px;
    border: 1px solid rgba(25, 84, 232, .18);
    border-radius: 8px;
    background: #eef4ff;
}

.help-role-badge span {
    display: block;
    color: #5b6b84;
    font-size: 13px;
}

.help-role-badge strong {
    display: block;
    color: var(--brand);
    font-size: 20px;
}

.help-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.help-toc a {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.help-toc a:hover,
.help-toc a:focus {
    border-color: rgba(25, 84, 232, .35);
    color: var(--brand);
}

.help-section {
    scroll-margin-top: 92px;
    margin-bottom: 34px;
}

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

.help-section-heading h2 {
    margin-bottom: 4px;
    font-size: 25px;
    font-weight: 800;
}

.help-section-heading p {
    margin-bottom: 0;
    color: #5b6b84;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.help-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-card,
.help-shot,
.help-status {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(22, 32, 51, .06);
}

.help-card {
    padding: 20px;
}

.help-card--wide {
    min-height: 100%;
}

.help-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 800;
}

.help-card p,
.help-card li {
    color: #44546a;
}

.help-card p:last-child,
.help-list {
    margin-bottom: 0;
}

.help-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    font-weight: 800;
}

.help-list {
    padding-left: 20px;
}

.help-list li + li {
    margin-top: 8px;
}

.help-shot {
    min-height: 280px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff, #f7faff);
}

.help-shot-bar {
    width: 100%;
    height: 38px;
    margin-bottom: 28px;
    border-radius: 8px;
    background: linear-gradient(90deg, #10213e, #17479f);
}

.help-shot-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.help-shot-qr {
    width: 120px;
    height: 120px;
    border: 10px solid #fff;
    border-radius: 8px;
    background:
        linear-gradient(90deg, #162033 12px, transparent 12px) 0 0 / 24px 24px,
        linear-gradient(#162033 12px, transparent 12px) 0 0 / 24px 24px,
        #eef4ff;
    box-shadow: inset 0 0 0 1px var(--line), 0 12px 26px rgba(22, 32, 51, .12);
}

.help-shot-copy span,
.help-shot-copy strong {
    display: block;
    border-radius: 999px;
    background: #dce7f8;
}

.help-shot-copy span {
    width: 42%;
    height: 12px;
    margin-bottom: 12px;
}

.help-shot-copy strong {
    width: 86%;
    height: 28px;
    margin-bottom: 28px;
}

.help-shot-copy button {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    color: #fff;
    font-weight: 800;
}

.help-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.help-status {
    padding: 16px;
}

.help-status p {
    margin: 12px 0 0;
    color: #44546a;
}

@media (max-width: 991.98px) {
    .help-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .help-grid,
    .help-grid--three,
    .help-status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .help-hero,
    .help-card,
    .help-shot,
    .help-status {
        padding: 16px;
    }

    .help-toc {
        display: grid;
        grid-template-columns: 1fr;
    }

    .help-shot-row {
        grid-template-columns: 1fr;
    }

    .help-shot-qr {
        width: 150px;
        height: 150px;
    }
}

body {
    background: var(--page);
    color: var(--ink);
}

.app-nav {
    background: linear-gradient(90deg, #10213e, #17479f);
}

.nav-help-link {
    display: inline-flex;
    align-items: center;
}

.nav-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 50%;
    font-weight: 800;
    line-height: 1;
}

.auth-shell {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
}

.auth-panel,
.gift-result,
.admin-form,
.app-table,
.metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(22, 32, 51, .08);
}

.metric-action {
    width: 100%;
    text-align: left;
    color: inherit;
}

.metric-action:hover,
.metric-action:focus {
    border-color: rgba(25, 84, 232, .35);
    outline: 0;
}

.metric em {
    display: block;
    margin-top: 4px;
    color: #5b6b84;
    font-size: 13px;
    font-style: normal;
}

.metric-success strong {
    color: var(--accent);
}

.metric-danger strong {
    color: var(--danger);
}

.auth-panel {
    width: min(440px, 100%);
    padding: 32px;
}

.gift-stage-shell {
    position: relative;
}

.gift-stage-shell.is-assets-loading {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .32s ease, transform .32s ease;
}

.gift-assets-loader {
    min-height: 62vh;
    display: grid;
    place-items: center;
    transition: opacity .28s ease, visibility .28s ease;
}

.gift-assets-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    min-height: 0;
    overflow: hidden;
}

.gift-assets-loader__card {
    width: min(100%, 360px);
    padding: 26px 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f6f9ff);
    box-shadow: 0 18px 45px rgba(22, 32, 51, .08);
    text-align: center;
}

.gift-assets-loader__spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 4px solid rgba(25, 84, 232, .14);
    border-top-color: #1954e8;
    border-right-color: #00a876;
    animation: giftLoaderSpin 1s linear infinite;
}

.gift-assets-loader__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
}

.gift-assets-loader__text {
    color: #5b6b84;
}

.gift-stage {
    width: 100%;
}

.gift-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 32px;
    align-items: center;
    min-height: 52vh;
}

.gift-copy {
    max-width: 720px;
    order: 1;
}

.gift-copy-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.gift-summary {
    max-width: 560px;
    color: #44546a;
    font-size: 17px;
}

.gift-instructions {
    max-width: 640px;
    margin-bottom: 24px;
    color: #44546a;
    font-size: 17px;
}

.gift-instructions p {
    margin-bottom: 10px;
}

.gift-help-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 20px;
    flex: 0 0 auto;
}

.gift-help-card {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f4f7fb;
    color: #44546a;
}

.gift-password-fill-button {
    min-width: 62px;
    border: 1px solid rgba(25, 84, 232, .28);
    background: linear-gradient(180deg, #eef4ff, #dbe8ff);
    color: var(--brand);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.gift-password-fill-button:hover,
.gift-password-fill-button:focus {
    background: linear-gradient(180deg, #1954e8, #1749c8);
    color: #fff;
    box-shadow: 0 10px 22px rgba(25, 84, 232, .22);
    transform: translateY(-1px);
}

.gift-password-fill-button:active {
    transform: translateY(0);
}

.gift-launch-wrap {
    width: min(100%, 420px);
}

.qr-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    justify-self: end;
    width: min(100%, 340px);
    order: 2;
}

.qr-box img {
    width: 240px;
    height: 240px;
}

.btn-gift {
    min-height: 64px;
    min-width: 260px;
    padding-left: 28px;
    padding-right: 28px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    border: 0;
    color: #fff;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 16px 32px rgba(25, 84, 232, .18);
}

.btn-gift.is-loading {
    opacity: .75;
}

.gift-button-cluster {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: min(100%, 760px);
}

.gift-stage--chooser {
    min-height: 62vh;
    display: grid;
    place-items: center;
}

.gift-chooser {
    width: min(100%, 980px);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.gift-chooser-board {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 680px;
    max-width: 633px;
    margin: auto;
    padding: 28px 22px;
    border-radius: 8px;
    background: #070d18;
    border: 1px solid rgba(124, 147, 188, .18);
    box-shadow: inset 0 0 0 1px rgba(170, 189, 226, .08), 0 26px 65px rgba(1, 8, 24, .62);
}

.gift-choice-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 0;
    max-width: 900px;
    width: min(100%, 900px);
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin: 0 auto;
}

.gift-choice-button {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1107 / 231;
    padding: 0;
    border: 0;
    border-radius: 24px;
    color: transparent;
    transition: transform .42s ease, box-shadow .42s ease, opacity .42s ease;
    display: block;
    will-change: transform;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .35), 0 0 22px rgba(245, 199, 93, .18);
}

.gift-choice-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 236, 183, .34) 42%, transparent 68%);
    transform: translateX(-100%);
    transition: transform 1.4s ease;
    pointer-events: none;
    animation: giftShimmer 3.8s ease-in-out infinite;
}

.gift-choice-button::after {
    content: none;
}

.gift-choice-button--texture-1 { background-image: url("../img/prize-strip-1.png"); }
.gift-choice-button--texture-2 { background-image: url("../img/prize-strip-2.png"); }
.gift-choice-button--texture-3 { background-image: url("../img/prize-strip-3.png"); }
.gift-choice-button--texture-4 { background-image: url("../img/prize-strip-4.png"); }

.gift-choice-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 24px 44px rgba(9, 20, 45, .34), 0 0 28px rgba(255, 196, 78, .32);
}

.gift-choice-button:hover::before {
    transform: translateX(100%);
}

.gift-choice-button:disabled {
    opacity: .96;
}

.gift-choice-button.is-loading,
.gift-choice-button.is-picked {
    transform: scale(1.04);
    box-shadow: 0 26px 48px rgba(9, 20, 45, .38), 0 0 34px rgba(255, 209, 103, .42);
}

.gift-chooser-board.is-revealing .gift-choice-button {
    opacity: 0;
    transform: translate3d(0, 34px, 0) scale(.12);
    animation: choiceFlyIn .82s cubic-bezier(.16, .9, .2, 1) forwards;
}

.gift-chooser-board.is-revealing .gift-choice-button:nth-child(1) {
    animation-delay: 0s;
}

.gift-chooser-board.is-revealing .gift-choice-button:nth-child(4) {
    animation-delay: .28s;
}

.gift-chooser-board.is-revealing .gift-choice-button:nth-child(3) {
    animation-delay: .56s;
}

.gift-chooser-board.is-revealing .gift-choice-button:nth-child(2) {
    animation-delay: .84s;
}

.gift-chooser-board.is-ready .gift-choice-button {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.gift-chooser-note {
    margin-top: 14px;
    text-align: center;
    color: #c8d4ef;
    font-weight: 600;
    letter-spacing: .02em;
}

.gift-chooser-sparks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.gift-fall-sparks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.fall-spark {
    position: absolute;
    top: -24px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle, #fff 0 25%, #ffd978 26% 75%, rgba(255, 217, 120, 0) 76%);
    box-shadow: 0 0 10px rgba(255, 217, 120, .55);
    animation: fallSpark 7.5s linear infinite;
}

.fall-spark-1 { left: 3%; animation-delay: .2s; animation-duration: 7.4s; }
.fall-spark-2 { left: 7%; animation-delay: 1.3s; animation-duration: 6.8s; }
.fall-spark-3 { left: 12%; animation-delay: .8s; animation-duration: 8.1s; }
.fall-spark-4 { left: 16%; animation-delay: 2.1s; animation-duration: 7.2s; }
.fall-spark-5 { left: 20%; animation-delay: 1.1s; animation-duration: 7.9s; }
.fall-spark-6 { left: 24%; animation-delay: .5s; animation-duration: 6.9s; }
.fall-spark-7 { left: 29%; animation-delay: 2.7s; animation-duration: 7.7s; }
.fall-spark-8 { left: 33%; animation-delay: 1.9s; animation-duration: 8.3s; }
.fall-spark-9 { left: 38%; animation-delay: .6s; animation-duration: 7.1s; }
.fall-spark-10 { left: 42%; animation-delay: 2.3s; animation-duration: 6.7s; }
.fall-spark-11 { left: 46%; animation-delay: 1.5s; animation-duration: 7.8s; }
.fall-spark-12 { left: 50%; animation-delay: .4s; animation-duration: 8.2s; }
.fall-spark-13 { left: 55%; animation-delay: 2.8s; animation-duration: 7.3s; }
.fall-spark-14 { left: 59%; animation-delay: 1.7s; animation-duration: 7.9s; }
.fall-spark-15 { left: 63%; animation-delay: .9s; animation-duration: 6.6s; }
.fall-spark-16 { left: 68%; animation-delay: 2.4s; animation-duration: 8.4s; }
.fall-spark-17 { left: 72%; animation-delay: 1.2s; animation-duration: 7.5s; }
.fall-spark-18 { left: 77%; animation-delay: .7s; animation-duration: 6.9s; }
.fall-spark-19 { left: 81%; animation-delay: 2.9s; animation-duration: 7.6s; }
.fall-spark-20 { left: 85%; animation-delay: 1.6s; animation-duration: 8.0s; }
.fall-spark-21 { left: 89%; animation-delay: .3s; animation-duration: 7.2s; }
.fall-spark-22 { left: 93%; animation-delay: 2.0s; animation-duration: 6.8s; }
.fall-spark-23 { left: 96%; animation-delay: 1.0s; animation-duration: 7.4s; }
.fall-spark-24 { left: 98%; animation-delay: 2.6s; animation-duration: 7.9s; }

.chooser-spark {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle, #fff 0 24%, #ffd66f 26% 64%, rgba(255, 214, 111, 0) 66%);
    box-shadow: 0 0 14px rgba(255, 214, 111, .75);
}

.gift-chooser-board.is-shuffling .chooser-spark {
    animation: chooserSpark 1s ease-out infinite;
}

.chooser-spark-1 { left: 10%; top: 18%; animation-delay: .05s; }
.chooser-spark-2 { left: 18%; top: 40%; animation-delay: .12s; }
.chooser-spark-3 { left: 24%; top: 22%; animation-delay: .2s; }
.chooser-spark-4 { left: 32%; top: 48%; animation-delay: .28s; }
.chooser-spark-5 { left: 41%; top: 18%; animation-delay: .36s; }
.chooser-spark-6 { left: 49%; top: 52%; animation-delay: .44s; }
.chooser-spark-7 { left: 58%; top: 23%; animation-delay: .52s; }
.chooser-spark-8 { left: 66%; top: 44%; animation-delay: .6s; }
.chooser-spark-9 { left: 75%; top: 17%; animation-delay: .68s; }
.chooser-spark-10 { left: 83%; top: 38%; animation-delay: .76s; }
.chooser-spark-11 { left: 13%; top: 68%; animation-delay: .16s; }
.chooser-spark-12 { left: 28%; top: 76%; animation-delay: .24s; }
.chooser-spark-13 { left: 44%; top: 70%; animation-delay: .32s; }
.chooser-spark-14 { left: 57%; top: 78%; animation-delay: .4s; }
.chooser-spark-15 { left: 71%; top: 72%; animation-delay: .48s; }
.chooser-spark-16 { left: 87%; top: 66%; animation-delay: .56s; }
.chooser-spark-17 { left: 52%; top: 10%; animation-delay: .64s; }
.chooser-spark-18 { left: 90%; top: 22%; animation-delay: .72s; }

@keyframes chooserSpark {
    0% {
        opacity: 0;
        transform: translate3d(0, 12px, 0) scale(.3);
    }
    22% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -38px, 0) scale(1.35);
    }
}

@keyframes fallSpark {
    0% {
        opacity: 0;
        transform: translate3d(0, -22px, 0) scale(.5);
    }
    10% {
        opacity: .75;
    }
    90% {
        opacity: .55;
    }
    100% {
        opacity: 0;
        transform: translate3d(0, 740px, 0) scale(1.1);
    }
}

@keyframes choiceFlyIn {
    0% {
        opacity: 0;
        transform: translate3d(0, 46px, 0) scale(.08);
        filter: blur(4px);
    }
    55% {
        opacity: 1;
        transform: translate3d(0, -4px, 0) scale(1.08);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }
}

@keyframes giftShimmer {
    0%, 100% {
        transform: translateX(-115%);
        opacity: .65;
    }
    50% {
        transform: translateX(115%);
        opacity: 1;
    }
}

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

@keyframes coinPulse {
    0%, 100% {
        box-shadow: inset 0 0 0 1px rgba(255, 238, 183, .35), 0 8px 18px rgba(0, 0, 0, .45), 0 0 14px rgba(255, 191, 77, .22);
    }
    50% {
        box-shadow: inset 0 0 0 1px rgba(255, 245, 208, .55), 0 8px 18px rgba(0, 0, 0, .45), 0 0 22px rgba(255, 200, 90, .45);
    }
}

@keyframes lineGlow {
    0%, 100% {
        opacity: .68;
        filter: drop-shadow(0 0 2px rgba(255, 205, 104, .25));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(255, 205, 104, .55));
    }
}

.btn-gift::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .28) 38%, transparent 72%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.btn-gift:hover::before {
    transform: translateX(120%);
}

.btn-gift-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.btn-gift-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-gift--aurora {
    background: linear-gradient(135deg, #1954e8 0%, #15b8ff 52%, #1cc98a 100%);
}

.btn-gift--sunrise {
    background: linear-gradient(135deg, #ff8a00 0%, #ff4d6d 55%, #7a5cff 100%);
}

.btn-gift--confetti {
    background: linear-gradient(135deg, #7048ff 0%, #c73cff 45%, #ff7b54 100%);
}

.gift-result {
    max-width: 620px;
    margin: 0 auto;
    padding: 28px;
}

.gift-result-icon,
.prize-admin-icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.gift-result-icon {
    width: 96px;
    height: 96px;
    margin-bottom: 16px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.metric {
    padding: 20px;
}

.metric span {
    color: #5b6b84;
}

.metric strong {
    display: block;
    font-size: 34px;
}

.page-heading-actions {
    display: grid;
    grid-template-columns: minmax(0, 10fr) auto;
    gap: 24px;
    align-items: end;
}

.page-heading-actions .btn {
    white-space: nowrap;
    justify-self: end;
}

.auto-refresh-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: flex-end;
}

.auto-refresh-toggle {
    min-width: 210px;
    margin-bottom: 0;
    color: #5b6b84;
    white-space: nowrap;
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.stats-prize-icons {
    display: none;
}

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

.stats-summary-grid > div {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 14px 32px rgba(22, 32, 51, .06);
}

.stats-summary-grid span {
    display: block;
    color: #5b6b84;
    font-size: 13px;
}

.stats-summary-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    line-height: 1.1;
}

.stats-filter-bar {
    grid-template-columns:
        minmax(128px, 170px)
        minmax(128px, 170px)
        minmax(160px, 220px)
        minmax(140px, 180px)
        auto
        auto;
    align-items: center;
}

.stats-filter-bar .btn {
    white-space: nowrap;
}

.stats-row[data-stats-credentials-open] {
    cursor: pointer;
}

.stats-prize-icon {
    position: relative;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(25, 84, 232, .16);
    border-radius: 8px;
    background: #fff;
    color: var(--brand);
    font-weight: 800;
    overflow: visible;
}

.stats-prize-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.stats-prize-icon em {
    position: absolute;
    right: -5px;
    bottom: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--brand);
    color: #fff;
    font-style: normal;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.admin-section {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.messenger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.messenger-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.user-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.user-status {
    color: #fff;
}

.user-status-active { background: var(--accent); }
.user-status-fired { background: #6c757d; }
.user-status-blocked { background: var(--danger); }

.admin-form,
.app-table {
    padding: 16px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(140px, 180px) minmax(190px, 230px) auto;
    gap: 10px;
}

.filter-bar.stats-filter-bar {
    grid-template-columns:
        minmax(128px, 170px)
        minmax(128px, 170px)
        minmax(160px, 220px)
        minmax(140px, 180px)
        max-content
        max-content;
    align-items: center;
}

.order-filter-bar {
    grid-template-columns:
        minmax(150px, 220px)
        minmax(140px, 180px)
        minmax(140px, 180px)
        minmax(150px, 190px)
        auto;
    align-items: center;
}

.order-filter-bar .btn {
    white-space: nowrap;
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

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

.report-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 18px 48px rgba(15, 36, 84, .06);
    overflow: hidden;
}

.report-tabs {
    padding: 0 16px;
    background: #f4f7fb;
}

.report-tabs .nav-link {
    margin-bottom: -1px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 700;
}

.report-tabs .nav-link.active {
    background: rgba(255, 255, 255, .72);
    border-bottom-color: rgba(255, 255, 255, .72);
}

.report-panel {
    padding: 16px;
    background: rgba(255, 255, 255, .72);
}

.report-summary > div {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.report-summary span {
    display: block;
    color: #5b6b84;
    font-size: 13px;
}

.report-summary strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
}

.report-status-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.report-accordion {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
}

.report-employee {
    border: 0;
    border-radius: 0;
}

.report-employee + .report-employee {
    border-top: 1px solid var(--line);
}

.report-employee .accordion-header {
    position: relative;
}

.report-employee-toggle {
    position: relative;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 14px;
    padding-right: 180px;
    background: var(--surface);
}

.report-employee-toggle::after {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
}

.report-employee-toggle:not(.collapsed)::after {
    transform: translateY(-50%) rotate(-180deg);
}

.report-employee-main {
    display: grid;
    gap: 2px;
    text-align: left;
}

.report-employee-name {
    color: var(--ink);
    font-weight: 800;
}

.report-employee-download {
    position: absolute;
    top: 50%;
    right: 54px;
    z-index: 4;
    transform: translateY(-50%);
    white-space: nowrap;
}

.report-employee .app-table {
    border: 0;
    border-radius: 0;
    padding: 0;
}

.sms-filter-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
}

.gateway-filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(160px, 220px) auto;
    gap: 10px;
}

.sms-filter-bar .btn {
    min-height: 38px;
}

.sms-status-strip,
.gateway-status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gateway-status-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sms-status-strip > div,
.gateway-status-strip > div {
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.sms-status-strip span,
.gateway-status-strip span {
    display: block;
    color: #5b6b84;
    font-size: 13px;
}

.sms-status-strip strong,
.gateway-status-strip strong {
    display: block;
    margin-top: 2px;
    font-size: 22px;
}

.sms-table {
    min-width: 1120px;
}

.gateway-table {
    min-width: 1280px;
}

.sms-body {
    max-width: 420px;
    white-space: normal;
    word-break: break-word;
}

.sms-code {
    display: inline-block;
    min-width: 72px;
    cursor: default;
}

.sms-code-full {
    display: none;
}

.sms-code:hover .sms-code-mask,
.sms-code:focus .sms-code-mask {
    display: none;
}

.sms-code:hover .sms-code-full,
.sms-code:focus .sms-code-full {
    display: inline;
}

.gateway-list {
    max-width: 240px;
}

.gateway-list span {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 3px 7px;
    border-radius: 8px;
    background: #eef4ff;
    color: #1d3558;
    font-size: 12px;
}

.gateway-error {
    max-width: 240px;
    white-space: normal;
    word-break: break-word;
}

.battery-level {
    display: inline-block;
    margin-right: 6px;
    font-weight: 700;
    color: var(--accent);
}

.battery-level.is-low {
    color: var(--danger);
}

.order-action {
    display: grid;
    grid-template-columns: 130px 70px minmax(160px, 1fr) 48px;
    gap: 6px;
}

.prize-edit-form {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.4fr) minmax(180px, 1.4fr) 100px auto auto;
    gap: 6px;
    min-width: 820px;
}

.gift-action-icons .action-icon-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.gift-action-icons .action-icon-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.gift-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 92px 44px;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.gift-item-row--priced {
    grid-template-columns: minmax(220px, 1fr) 92px minmax(130px, 170px) 44px;
}

.gift-item-price {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.gift-item-price span {
    color: #5b6b84;
    font-size: 12px;
    line-height: 1.2;
}

.gift-item-price strong {
    font-size: 14px;
    line-height: 1.2;
}

.gift-summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: #f4f7fb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.gift-summary-card span {
    display: block;
    color: #5b6b84;
    font-size: 13px;
}

.gift-summary-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}

.gift-summary-meta {
    text-align: right;
}

.secret-field {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.secret-field span {
    color: #5b6b84;
}

.secret-field code {
    display: block;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f4f7fb;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
}

.badge {
    text-transform: uppercase;
}

.status-new { background: var(--brand); }
.status-processing { background: var(--warn); color: #1d1d1d; }
.status-done { background: var(--accent); }
.status-failed { background: var(--danger); }

.prize-modal .modal-dialog {
    max-width: min(680px, 94vw);
}

.prize-modal-content {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 183, 74, .22), rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .35) 100%),
        url("../img/prize_stage_bg.png");
    aspect-ratio: 1126 / 1397;
    background-size: 100% 100%;
    background-position: center;
    color: #fff;
    box-shadow: 0 28px 80px rgba(15, 36, 84, .35);
}

.prize-modal .modal-body {
    position: relative;
    min-height: clamp(520px, 78vh, 860px);
    height: 100%;
    padding: 26px;
}

.prize-close {
    position: absolute;
    top: 34px;
    right: 32px;
    z-index: 8;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent url("../img/close_btn.png") center / contain no-repeat;
    opacity: 1;
    box-shadow: 0 10px 24px rgba(15, 36, 84, .28);
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.prize-close:hover {
    transform: scale(1.04);
    filter: brightness(1.04);
    box-shadow: 0 14px 28px rgba(15, 36, 84, .34);
}

.prize-close:focus,
.prize-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 214, 122, .35), 0 14px 28px rgba(15, 36, 84, .34);
}

.prize-close::before,
.prize-close::after {
    display: none;
}

.prize-stage {
    position: relative;
    min-height: 100%;
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
    transform: translateY(-8%);
}

.chest-wrap {
    position: relative;
    width: min(288px, 45.8%);
    aspect-ratio: 263 / 246;
    margin: 12px auto 6px;
}

.prize-chest-gif {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .32));
    opacity: 1;
    transition: opacity .18s ease;
}

.prize-modal-content.is-gif-loading .prize-chest-gif {
    opacity: 0;
}

.prize-burst {
    position: absolute;
    left: 50%;
    top: 22px;
    z-index: 4;
    width: min(360px, 88vw);
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    transform: translate(-50%, 0);
    pointer-events: none;
}

.prize-pop-item {
    --i: 0;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateY(72px) scale(.18) rotate(-10deg);
}

.prize-icon {
    max-width: 86px;
    max-height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .28));
}

.prize-ticket-fallback {
    width: 86px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff, #dff6ff);
    color: #17479f;
    font-weight: 800;
    box-shadow: 0 16px 25px rgba(0, 0, 0, .22);
}

.spark-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.spark {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 22%, #ffe66d 24% 58%, rgba(255, 230, 109, 0) 62%);
    box-shadow: 0 0 18px rgba(255, 230, 109, .78);
    opacity: 0;
}

.spark-1 { left: 22%; top: 36%; --x: -58px; --y: -142px; --s: 1.5; }
.spark-2 { left: 31%; top: 31%; --x: -38px; --y: -172px; --s: 1.1; }
.spark-3 { left: 42%; top: 28%; --x: -18px; --y: -154px; --s: 1.7; }
.spark-4 { left: 52%; top: 25%; --x: 8px; --y: -188px; --s: 1.2; }
.spark-5 { left: 63%; top: 29%; --x: 32px; --y: -158px; --s: 1.6; }
.spark-6 { left: 73%; top: 34%; --x: 62px; --y: -140px; --s: 1.3; }
.spark-7 { left: 27%; top: 48%; --x: -78px; --y: -96px; --s: 1; }
.spark-8 { left: 38%; top: 45%; --x: -45px; --y: -116px; --s: 1.4; }
.spark-9 { left: 50%; top: 42%; --x: 0; --y: -128px; --s: 1.8; }
.spark-10 { left: 61%; top: 45%; --x: 42px; --y: -112px; --s: 1.25; }
.spark-11 { left: 72%; top: 49%; --x: 76px; --y: -92px; --s: 1.45; }
.spark-12 { left: 33%; top: 58%; --x: -62px; --y: -70px; --s: 1.15; }
.spark-13 { left: 45%; top: 56%; --x: -22px; --y: -84px; --s: 1.55; }
.spark-14 { left: 57%; top: 56%; --x: 24px; --y: -82px; --s: 1.2; }
.spark-15 { left: 68%; top: 58%; --x: 60px; --y: -68px; --s: 1.65; }

.prize-kicker {
    margin: 8px 0 4px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    opacity: .75;
}

.prize-title {
    min-height: 44px;
    margin: 0;
    font-weight: 800;
    line-height: 1.08;
}

.prize-price {
    display: none;
}

.prize-items {
    min-height: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.prize-items span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    font-size: 13px;
    font-weight: 700;
}

.prize-hand-overlay {
    position: absolute;
    inset: 0;
    z-index: 9;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(5, 10, 24, .18);
}

.prize-hand-panel {
    width: min(100%, 420px);
    padding: 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    box-shadow: 0 20px 48px rgba(4, 11, 27, .38);
}

.prize-hand-form {
    color: var(--ink);
}

.prize-hand-panel [data-prize-hand-message] {
    margin: 0 0 10px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.25;
}

.prize-modal-content.is-opening .spark {
    animation: sparkFly 1.65s ease-out forwards, sparkTwinkle .34s linear 2.1s 5;
}

.prize-modal-content.is-opening .spark-1 { animation-delay: 2.02s, 2.02s; }
.prize-modal-content.is-opening .spark-2 { animation-delay: 2.08s, 2.08s; }
.prize-modal-content.is-opening .spark-3 { animation-delay: 2.14s, 2.14s; }
.prize-modal-content.is-opening .spark-4 { animation-delay: 2.2s, 2.2s; }
.prize-modal-content.is-opening .spark-5 { animation-delay: 2.26s, 2.26s; }
.prize-modal-content.is-opening .spark-6 { animation-delay: 2.32s, 2.32s; }
.prize-modal-content.is-opening .spark-7 { animation-delay: 2.12s, 2.12s; }
.prize-modal-content.is-opening .spark-8 { animation-delay: 2.18s, 2.18s; }
.prize-modal-content.is-opening .spark-9 { animation-delay: 2.24s, 2.24s; }
.prize-modal-content.is-opening .spark-10 { animation-delay: 2.3s, 2.3s; }
.prize-modal-content.is-opening .spark-11 { animation-delay: 2.36s, 2.36s; }
.prize-modal-content.is-opening .spark-12 { animation-delay: 2.22s, 2.22s; }
.prize-modal-content.is-opening .spark-13 { animation-delay: 2.28s, 2.28s; }
.prize-modal-content.is-opening .spark-14 { animation-delay: 2.34s, 2.34s; }
.prize-modal-content.is-opening .spark-15 { animation-delay: 2.4s, 2.4s; }

.prize-modal-content.is-opened .prize-burst {
    opacity: 1;
}

.prize-modal-content.is-opened .prize-pop-item {
    animation: prizeJump 1.05s cubic-bezier(.16, 1.08, .28, 1) forwards;
    animation-delay: calc(var(--i) * .18s);
}

@keyframes sparkFly {
    0% { opacity: 0; transform: translate(0, 22px) scale(.35); }
    25% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(var(--s)); }
}

@keyframes sparkTwinkle {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.8); }
}

@keyframes prizeJump {
    0% {
        opacity: 0;
        transform: translateY(78px) scale(.18) rotate(-12deg);
    }
    28% {
        opacity: 1;
        transform: translateY(-82px) scale(1.16) rotate(8deg);
    }
    46% {
        transform: translateY(-46px) scale(.96) rotate(-4deg);
    }
    68% {
        transform: translateY(-58px) scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(-54px) scale(1) rotate(0);
    }
}

@media (max-width: 768px) {
    .gift-hero,
    .metric-grid,
    .admin-section,
    .page-heading-actions,
    .filter-bar,
    .stats-summary-grid,
    .report-summary,
    .report-employee-head,
    .sms-filter-bar,
    .sms-status-strip,
    .gateway-filter-bar,
    .gateway-status-strip,
    .order-action,
    .prize-edit-form,
    .gift-item-row {
        grid-template-columns: 1fr;
    }

    .gift-hero {
        min-height: auto;
        gap: 22px;
    }

    .gift-copy {
        max-width: none;
    }

    .report-status-strip {
        justify-content: flex-start;
    }

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

    .filter-bar.stats-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 12px;
        width: 100%;
    }

    .stats-filter-bar > * {
        min-width: 0;
        width: 100% !important;
        max-width: none;
    }

    .stats-filter-bar .btn {
        width: 100%;
    }

    .stats-filter-from {
        grid-column: 1;
        grid-row: 1;
    }

    .stats-filter-to {
        grid-column: 2;
        grid-row: 1;
    }

    .stats-filter-period {
        grid-column: 1;
        grid-row: 2;
    }

    .stats-filter-per-page {
        grid-column: 2;
        grid-row: 2;
    }

    .stats-filter-submit {
        grid-column: 1;
        grid-row: 3;
    }

    .stats-filter-reset {
        grid-column: 2;
        grid-row: 3;
    }

    .auto-refresh-actions {
        justify-content: flex-start;
    }

    .pagination-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-table-wrap {
        padding: 10px;
        overflow: visible;
    }

    .stats-table {
        margin-bottom: 0;
    }

    .stats-table thead {
        display: none;
    }

    .stats-table,
    .stats-table tbody,
    .stats-table tr,
    .stats-table td {
        display: block;
    }

    .stats-table tbody {
        display: grid;
        gap: 10px;
    }

    .stats-table .stats-row {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 8px 12px;
        align-items: center;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
    }

    .stats-table .stats-row-new {
        border-color: rgba(25, 84, 232, .22);
        background: #eaf2ff;
        font-weight: 800;
    }

    .stats-table .stats-row-processing {
        border-color: rgba(245, 165, 36, .28);
        background: #fff3df;
    }

    .stats-table .stats-row-done {
        border-color: rgba(0, 168, 118, .22);
        background: #e9f8f1;
    }

    .stats-table .stats-row-failed {
        border-color: rgba(229, 72, 77, .28);
        background: #ffecec;
    }

    .stats-table td {
        padding: 0 !important;
        border: 0;
        background: transparent !important;
        box-shadow: none !important;
    }

    .stats-table .stats-row > td {
        width: auto;
        min-width: 0;
    }

    .stats-date-cell span,
    .stats-date-cell strong {
        display: block;
        line-height: 1.15;
    }

    .stats-date-cell span {
        color: #5b6b84;
        font-size: 12px;
    }

    .stats-date-cell strong {
        margin-top: 3px;
        font-size: 18px;
    }

    .stats-prize-text,
    .stats-table .stats-tickets-cell,
    .stats-table .stats-status-cell,
    .stats-table .stats-comment-cell {
        display: none !important;
    }

    .stats-date-cell {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .stats-client-cell {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        font-size: clamp(15px, 4vw, 18px);
        font-weight: 800;
        line-height: 1.15;
        text-align: right;
        white-space: nowrap;
    }

    .stats-prize-cell {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        max-width: 100%;
    }

    .stats-prize-icons {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        align-items: center;
        justify-content: end;
        max-width: 100%;
        overflow: hidden;
    }

    .stats-prize-icon {
        width: clamp(24px, 7.8vw, 34px);
        height: clamp(24px, 7.8vw, 34px);
        flex: 0 1 clamp(24px, 7.8vw, 34px);
        background: rgba(255, 255, 255, .64);
    }

    .report-panel {
        padding: 12px;
    }

    .report-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .report-employee-toggle {
        grid-template-columns: 1fr;
        padding-right: 48px;
    }

    .report-employee-download {
        position: static;
        width: calc(100% - 24px);
        margin: 0 12px 12px;
        transform: none;
    }

    .gift-copy {
        order: 2;
    }

    .qr-box {
        order: 1;
    }

    .gift-copy-head {
        align-items: center;
    }

    .gift-summary,
    .gift-instructions {
        font-size: 16px;
    }

    .gift-button-cluster {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .btn-gift {
        width: 100%;
        min-width: 0;
    }

    .gift-item-row,
    .gift-item-row--priced {
        grid-template-columns: 1fr;
    }

    .gift-stage--chooser {
        min-height: auto;
    }

    .gift-chooser {
        width: 100%;
    }

    .gift-chooser-board {
        min-height: calc(100dvh - 120px);
        padding: 24px 14px;
        border-radius: 8px;
    }

    .gift-choice-grid {
        justify-content: space-evenly;
        gap: 0;
        min-height: 0;
        height: auto;
        flex: 1 1 auto;
        max-width: 100%;
    }

    .gift-choice-button {
        min-height: 0;
        aspect-ratio: 1107 / 231;
        padding: 0;
        border-radius: 22px;
    }

    .gift-summary-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .gift-summary-meta {
        text-align: left;
    }

    .qr-box {
        justify-self: stretch;
        width: 100%;
    }

    .qr-box img {
        width: 210px;
        height: 210px;
    }

    .prize-modal .modal-body {
        min-height: clamp(440px, 72vh, 720px);
        padding: 18px;
    }

    .prize-close {
        top: 28px;
        right: 24px;
        width: 50px;
        height: 50px;
    }

    .prize-stage {
        min-height: 100%;
        transform: translateY(-9%);
    }

    .prize-burst {
        width: 96vw;
        gap: 6px;
    }

    .prize-pop-item {
        width: 72px;
        height: 72px;
    }

    .prize-icon {
        max-width: 68px;
        max-height: 68px;
    }

    .prize-ticket-fallback {
        width: 70px;
        height: 50px;
        font-size: 13px;
    }

    .chest-wrap {
        width: min(204px, 45.8%);
        margin-top: 0;
    }

    .prize-hand-overlay {
        padding: 14px;
    }
}
