:root {
    color-scheme: dark;
    --black: #020404;
    --panel: #0f1214;
    --panel-deep: #050607;
    --white: #f5f7fa;
    --muted: #9ca3ab;
    --yellow: #ffd400;
    --orange: #ffb000;
    --line: rgba(255, 255, 255, .08);
    --yellow-line: rgba(255, 212, 0, .28);
    --success: #43d17a;
    --danger: #ff6c5f;
    font-family: "Inter", system-ui, sans-serif;
    font-synthesis: none;
    background: var(--black);
    color: var(--white);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #101112; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: #101112;
    color: var(--white);
}
button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.app,
.gate,
.state-overlay {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: var(--black);
}

.gate {
    min-height: 100vh;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.gate-mark {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--yellow);
    background: #090b0c;
    border: 1px solid var(--yellow-line);
    box-shadow: 0 0 50px rgba(255, 212, 0, .2);
    font-size: 42px;
}
.gate h1 { margin: 28px 0 10px; font-size: 30px; line-height: 34px; font-weight: 800; }
.gate p { max-width: 330px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 19px; }

.screen { display: none; min-height: 100vh; overflow: hidden; background: var(--black); }
.screen--active { display: block; animation: screen-enter .38s cubic-bezier(.2,.75,.25,1) both; }
@keyframes screen-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.home-screen { position: relative; min-height: 1250px; padding: 0 20px 26px; overflow-x: hidden; }
.screen--active.home-screen > :where(.home-hero,.drum-stage,.spin-action,.spin-status,.tasks-preview,.section-heading,.prize-preview,.winner-list) { animation: block-rise .46s cubic-bezier(.2,.75,.25,1) both; }
.screen--active.home-screen > .drum-stage { animation-delay: 60ms; }
.screen--active.home-screen > .spin-action { animation-delay: 110ms; }
.screen--active.home-screen > .spin-status { animation-delay: 145ms; }
.screen--active.home-screen > .tasks-preview { animation-delay: 180ms; }
.screen--active.home-screen > .section-heading { animation-delay: 220ms; }
.screen--active.home-screen > .prize-preview { animation-delay: 260ms; }
.screen--active.home-screen > .winners-heading { animation-delay: 300ms; }
.screen--active.home-screen > .winner-list { animation-delay: 340ms; }
@keyframes block-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wheel-toolbar { position: absolute; z-index: 12; top: 18px; right: 20px; display: flex; gap: 8px; }
.wheel-toolbar button { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 13px; background: rgba(10,12,13,.78); color: var(--muted); font-size: 10px; font-weight: 600; cursor: pointer; backdrop-filter: blur(12px); }
.wheel-toolbar button:active { border-color: var(--yellow-line); color: var(--white); }
.wheel-toolbar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-hero { padding: 76px 0 0; text-align: center; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 11px;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    line-height: 16px;
    font-weight: 500;
}
.hero-kicker i { font-style: normal; filter: drop-shadow(0 0 7px rgba(255,212,0,.55)); }
.home-hero h1 {
    margin: 0;
    font-size: 27px;
    line-height: 31px;
    font-weight: 800;
    letter-spacing: -.9px;
}
.home-hero h1 mark {
    display: inline-block;
    color: var(--yellow);
    background: none;
}
.home-hero p {
    display: none;
    margin: 0;
    color: rgba(255,255,255,.66);
    font-size: 13px;
    line-height: 20px;
    font-weight: 400;
}

.wheel-stage {
    width: min(calc(100vw - 55px), 375px);
    height: min(calc(100vw - 55px), 375px);
    margin: 5px auto 0;
    position: relative;
}
.wheel-machine { position: relative; width: 100%; height: 100%; isolation: isolate; }
.wheel-rotor {
    --segment-step: 45deg;
    position: absolute;
    z-index: 2;
    top: 22px;
    left: 50%;
    width: 344px;
    height: 344px;
    overflow: hidden;
    border: 7px solid #17191a;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #17191b 0 45deg, #090b0c 45deg 90deg, #17191b 90deg 135deg, #090b0c 135deg 180deg, #17191b 180deg 225deg, #090b0c 225deg 270deg, #17191b 270deg 315deg, #090b0c 315deg 360deg);
    box-shadow: 0 0 0 2px #e0a900, 0 0 0 5px #27200b, 0 0 30px rgba(255,212,0,.52), inset 0 0 50px rgba(0,0,0,.72);
    transform: translateX(-50%) rotate(0deg);
    will-change: transform;
}
.wheel-rotor::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 2px;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255,212,0,.72) 0 1px, transparent 1px var(--segment-step));
    pointer-events: none;
}
.wheel-rotor::after {
    content: "";
    position: absolute;
    z-index: 5;
    inset: 9px;
    border: 1px solid rgba(255,212,0,.5);
    border-radius: 50%;
    pointer-events: none;
}
.wheel-slots { position: absolute; inset: 0; z-index: 3; }
.wheel-slot {
    --slot-angle: 0deg;
    --slot-radius: 105px;
    --slot-size: 66px;
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--slot-size);
    height: var(--slot-size);
    margin: calc(var(--slot-size) / -2);
    transform: rotate(var(--slot-angle)) translateY(calc(var(--slot-radius) * -1)) rotate(calc(var(--slot-angle) * -1));
    display: grid;
    place-items: center;
}
.wheel-slot img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 12px; filter: drop-shadow(0 5px 7px rgba(0,0,0,.7)); }
.wheel-slot span { max-width: 68px; color: var(--yellow); font-size: 9px; line-height: 11px; font-weight: 700; text-align: center; }
.wheel-barrier {
    position: absolute;
    z-index: 6;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    margin: -3.5px;
    border-radius: 2px;
    background: var(--yellow);
    box-shadow: 0 0 7px rgba(255,212,0,.8);
    transform: rotate(var(--barrier-angle)) translateY(-158px) rotate(45deg);
}
.wheel-core {
    position: absolute;
    z-index: 8;
    top: 50%;
    left: 50%;
    width: 94px;
    height: 94px;
    display: grid;
    place-items: center;
    border: 2px solid var(--yellow);
    border-radius: 50%;
    background: radial-gradient(circle at 46% 36%, #17191a, #020303 72%);
    box-shadow: 0 0 16px rgba(255,212,0,.38), inset 0 0 20px rgba(0,0,0,.8);
    transform: translate(-50%,-50%);
}
.wheel-core span { color: var(--yellow); font-size: 68px; line-height: 1; font-weight: 800; transform: skew(-8deg); text-shadow: 0 0 13px rgba(255,212,0,.55); }
.wheel-pointer {
    position: absolute;
    z-index: 12;
    top: 2px;
    left: 50%;
    width: 48px;
    height: 64px;
    clip-path: polygon(12% 0,88% 0,100% 18%,50% 100%,0 18%);
    background: linear-gradient(145deg,#ffe56a 0%,#ffd400 44%,#c88a00 100%);
    border-radius: 15px;
    filter: drop-shadow(0 4px 7px rgba(0,0,0,.8)) drop-shadow(0 0 8px rgba(255,212,0,.42));
    transform: translateX(-50%) rotate(0deg);
    transform-origin: 50% 12%;
}
.wheel-pointer::after { content: ""; position: absolute; inset: 2px; clip-path: inherit; border: 1px solid rgba(255,255,255,.7); border-radius: inherit; }
.wheel-pointer i { position: absolute; z-index: 2; top: 11px; left: 50%; width: 11px; height: 11px; border-radius: 50%; background: #2a250d; transform: translateX(-50%); }
.wheel-pointer.is-ticking { animation: pointer-tick .09s cubic-bezier(.2,.8,.35,1); }
@keyframes pointer-tick { 0% { transform: translateX(-50%) rotate(0); } 38% { transform: translateX(-50%) rotate(17deg); } 100% { transform: translateX(-50%) rotate(0); } }

.timer-panel {
    height: 75px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.timer-panel span { color: var(--muted); font-size: 11px; line-height: 14px; font-weight: 500; }
.timer-panel strong { color: var(--yellow); font-size: 24px; line-height: 28px; font-weight: 700; }

.drum-stage {
    position: relative;
    width: calc(100% + 40px);
    max-width: 430px;
    height: 224px;
    margin: 10px -20px 0;
    overflow: visible;
    transform: none;
    isolation: isolate;
}
.drum-stage::before {
    content: "";
    position: absolute;
    inset: -56px -58px -60px;
    z-index: 0;
    background:
        radial-gradient(ellipse at 50% 52%, rgba(255,212,0,.24) 0 8%, rgba(255,212,0,.14) 21%, rgba(255,212,0,.05) 42%, transparent 72%),
        linear-gradient(90deg, transparent 0%, rgba(255,212,0,.035) 16%, rgba(255,212,0,.13) 50%, rgba(255,212,0,.035) 84%, transparent 100%);
    filter: blur(22px);
    -webkit-mask-image: radial-gradient(ellipse at 50% 52%, #000 0 44%, rgba(0,0,0,.7) 58%, transparent 78%);
    mask-image: radial-gradient(ellipse at 50% 52%, #000 0 44%, rgba(0,0,0,.7) 58%, transparent 78%);
    opacity: .95;
    pointer-events: none;
}
.drum-stage::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 32px;
    z-index: 2;
    height: 160px;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255,212,0,.05) 10%, rgba(255,212,0,.66) 29%, rgba(255,212,0,.96) 50%, rgba(255,212,0,.66) 71%, rgba(255,212,0,.05) 90%, transparent 100%) top / 100% 1px no-repeat,
        linear-gradient(90deg, transparent 0%, rgba(255,212,0,.04) 11%, rgba(255,212,0,.5) 30%, rgba(255,212,0,.76) 50%, rgba(255,212,0,.5) 70%, rgba(255,212,0,.04) 89%, transparent 100%) bottom / 100% 1px no-repeat;
    box-shadow: none;
    pointer-events: none;
}
.drum-machine { position: relative; z-index: 1; width: 100%; height: 100%; }
.drum-lightline {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(2,4,4,.96), rgba(2,4,4,.66) 7%, transparent 24%, transparent 76%, rgba(2,4,4,.66) 93%, rgba(2,4,4,.96)),
        radial-gradient(ellipse at 50% 50%, transparent 0 36%, rgba(0,0,0,.18) 78%, rgba(0,0,0,.46) 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.drum-window {
    position: absolute;
    left: 0;
    top: 32px;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border: 0;
    background:
        linear-gradient(180deg, rgba(255,212,0,.035), rgba(0,0,0,.02) 28%, rgba(0,0,0,.1)),
        linear-gradient(90deg, rgba(255,212,0,.025), transparent 24%, transparent 76%, rgba(255,212,0,.025));
    transform: none;
}
.drum-selection {
    position: absolute;
    z-index: 7;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 126px;
    border: 1px solid rgba(255,212,0,.96);
    background: radial-gradient(circle at 50% 34%, rgba(255,212,0,.1), transparent 64%);
    box-shadow: 0 0 0 1px rgba(255,212,0,.18), 0 0 30px rgba(255,212,0,.52), inset 0 0 22px rgba(255,212,0,.08);
    transform: translateX(-50%);
    pointer-events: none;
}
.drum-selection::before,
.drum-selection::after {
    content: "";
    position: absolute;
    left: -12px;
    right: -12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,212,0,.86), transparent);
}
.drum-selection::before { top: 0; }
.drum-selection::after { bottom: 0; }
.drum-selection.is-pulse {
    animation: drum-selection-pulse .2s ease-out;
}
.drum-selection.is-final {
    border-color: rgba(255,224,70,1);
    box-shadow: 0 0 0 1px rgba(255,212,0,.32), 0 0 42px rgba(255,212,0,.78), inset 0 0 26px rgba(255,212,0,.16);
    animation: drum-final-lock .72s cubic-bezier(.16,.84,.22,1) both;
}
@keyframes drum-selection-pulse {
    0% { box-shadow: 0 0 0 1px rgba(255,212,0,.18), 0 0 22px rgba(255,212,0,.38), inset 0 0 18px rgba(255,212,0,.08); }
    45% { box-shadow: 0 0 0 1px rgba(255,238,110,.52), 0 0 46px rgba(255,212,0,.82), inset 0 0 28px rgba(255,212,0,.2); }
    100% { box-shadow: 0 0 0 1px rgba(255,212,0,.18), 0 0 30px rgba(255,212,0,.52), inset 0 0 22px rgba(255,212,0,.08); }
}
@keyframes drum-final-lock {
    0% { transform: translateX(-50%) scale(.985); }
    38% { transform: translateX(-50%) scale(1.035); }
    68% { transform: translateX(-50%) scale(.995); }
    100% { transform: translateX(-50%) scale(1); }
}
.drum-window::before,
.drum-window::after {
    content: "";
    position: absolute;
    top: -5px;
    bottom: -5px;
    z-index: 5;
    width: 96px;
    pointer-events: none;
}
.drum-window::before { left: 0; background: linear-gradient(90deg, #020404 0%, rgba(2,4,4,.92) 18%, rgba(2,4,4,.45) 58%, transparent); }
.drum-window::after { right: 0; background: linear-gradient(270deg, #020404 0%, rgba(2,4,4,.92) 18%, rgba(2,4,4,.45) 58%, transparent); }
.drum-reel {
    position: absolute;
    inset: 0 auto 0 0;
    width: max-content;
    height: 100%;
    will-change: transform;
}
.drum-items {
    height: 100%;
    display: flex;
    align-items: stretch;
}
.drum-card {
    position: relative;
    flex: 0 0 126px;
    width: 126px;
    height: 160px;
    display: grid;
    grid-template-rows: 84px 1fr;
    place-items: center;
    padding: 14px 10px 11px;
    overflow: hidden;
    border-left: 1px solid rgba(255,255,255,.06);
    border-right: 1px solid rgba(255,255,255,.025);
    background: linear-gradient(180deg, rgba(21,23,25,.9), rgba(6,7,8,.98));
    color: var(--white);
    text-align: center;
    transition: transform .26s ease, border-color .26s ease, box-shadow .26s ease, background .26s ease;
}
.drum-card[data-rarity] {
    border-left-color: color-mix(in srgb, var(--rarity-color) 11%, rgba(255,255,255,.06));
    border-right-color: color-mix(in srgb, var(--rarity-color) 7%, rgba(255,255,255,.025));
    background:
        radial-gradient(ellipse at 50% 20%, color-mix(in srgb, var(--rarity-color) var(--rarity-glow), transparent), transparent 58%),
        linear-gradient(180deg, color-mix(in srgb, #151719, var(--rarity-color) var(--rarity-wash)), color-mix(in srgb, #060708, var(--rarity-color) var(--rarity-wash)));
    box-shadow: inset 0 -30px 36px color-mix(in srgb, var(--rarity-color) var(--rarity-wash), transparent);
}
.drum-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255,212,0,.08), transparent 50%);
    opacity: .35;
    pointer-events: none;
}
.drum-card[data-rarity]::before {
    background:
        linear-gradient(132deg, color-mix(in srgb, var(--rarity-color) 7%, transparent), transparent 38%),
        radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rarity-color) var(--rarity-glow), transparent), transparent 58%);
    opacity: .9;
}
.drum-card.is-selected {
    z-index: 1;
    border-left: 1px solid rgba(255,255,255,.06);
    border-right: 1px solid rgba(255,255,255,.025);
    box-shadow: none;
    transform: none;
}
.drum-card-art {
    position: relative;
    z-index: 1;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
}
.drum-card[data-rarity] .drum-card-art::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--rarity-color) var(--rarity-glow), transparent), transparent 68%);
    filter: blur(5px);
    opacity: .72;
    transform: scale(.92);
    transition: opacity .28s ease, transform .38s cubic-bezier(.16,.84,.22,1);
    pointer-events: none;
}
.drum-card-art img {
    position: relative;
    z-index: 1;
    max-width: 78px;
    max-height: 78px;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(0,0,0,.7));
}
.drum-empty-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,212,0,.7);
    border-radius: 14px;
    color: var(--yellow);
    font-size: 34px;
    font-weight: 800;
    box-shadow: inset 0 0 12px rgba(255,212,0,.1), 0 0 14px rgba(255,212,0,.14);
}
.drum-card-copy { position: relative; z-index: 1; width: 100%; min-width: 0; }
.drum-card-copy strong {
    display: -webkit-box;
    min-height: 32px;
    overflow: hidden;
    color: rgba(255,255,255,.9);
    font-size: 11px;
    line-height: 15px;
    font-weight: 600;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.drum-card-copy small {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,.58);
    font-size: 9px;
    line-height: 12px;
}
.drum-card-copy span { display: none; }
.drum-pointer {
    position: absolute;
    left: 50%;
    z-index: 8;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    filter: drop-shadow(0 0 10px rgba(255,212,0,.72));
    transition: transform .08s ease;
}
.drum-pointer--top {
    top: 4px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 29px solid var(--yellow);
    border-bottom: 0;
}
.drum-pointer--bottom {
    bottom: 1px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 29px solid var(--yellow);
    border-top: 0;
}
.drum-pointer.is-ticking { animation: pointer-tick .11s cubic-bezier(.2,.8,.35,1); }

.spin-action {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
.spin-status {
    min-height: 25px;
    margin-top: 15px;
    text-align: center;
}
.spin-status span {
    color: rgba(255,255,255,.62);
    font-size: 12px;
    line-height: 18px;
}

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}
.primary-button {
    color: #080906;
    border: 0;
    background: linear-gradient(90deg, var(--yellow), var(--orange));
    box-shadow: 0 8px 22px rgba(255, 194, 0, .24);
}
.secondary-button { color: var(--white); border: 1px solid rgba(255,255,255,.14); background: transparent; }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: .42; filter: grayscale(.35); cursor: not-allowed; }
.spin-button { position: relative; width: 216px; min-height: 49px; display: block; margin: 0 auto; overflow: hidden; border-radius: 11px; font-size: 13px; letter-spacing: .1px; box-shadow: 0 10px 28px rgba(255,212,0,.28), 0 0 18px rgba(255,212,0,.17); }
.spin-button::after { content: ""; position: absolute; inset: -30% auto -30% -42%; width: 30%; background: linear-gradient(100deg,transparent,rgba(255,255,255,.58),transparent); transform: skewX(-18deg); animation: button-sheen 4.8s ease-in-out infinite; }
@keyframes button-sheen { 0%,68% { left: -42%; opacity: 0; } 73% { opacity: .8; } 88%,100% { left: 118%; opacity: 0; } }

.section-divider { height: 1px; margin-top: 24px; background: rgba(255,255,255,.07); }
.section-heading { height: 51px; display: flex; align-items: center; justify-content: space-between; }
.section-heading h2 { margin: 0; font-size: 15px; line-height: 20px; font-weight: 700; }
.section-heading button { padding: 7px 0; border: 0; background: none; color: rgba(158,166,171,.74); font-size: 11px; line-height: 16px; font-weight: 500; cursor: pointer; }

.prize-preview {
    width: calc(100% + 20px);
    margin-right: -20px;
    padding: 0 20px 8px 0;
    display: flex;
    gap: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 0 20px;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.prize-preview::-webkit-scrollbar { display: none; }
.prize-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #0e1113, var(--panel-deep));
    color: var(--white);
    cursor: pointer;
}
.prize-card[data-rarity] {
    border-color: color-mix(in srgb, var(--rarity-color) 14%, var(--line));
    background:
        radial-gradient(ellipse at 50% 22%, color-mix(in srgb, var(--rarity-color) var(--rarity-glow), transparent), transparent 58%),
        linear-gradient(180deg, color-mix(in srgb, #0e1113, var(--rarity-color) var(--rarity-wash)), color-mix(in srgb, var(--panel-deep), var(--rarity-color) var(--rarity-wash)));
    box-shadow:
        inset 0 -42px 54px color-mix(in srgb, var(--rarity-color) var(--rarity-wash), transparent),
        0 10px 24px rgba(0,0,0,.24);
}
.prize-preview .prize-card { width: 122px; height: 178px; flex: 0 0 122px; border-radius: 16px; scroll-snap-align: start; }
.prize-image { position: relative; overflow: hidden; }
.prize-preview .prize-image { width: 122px; height: 112px; }
.prize-image img { position: relative; z-index: 2; width: 100%; height: 100%; display: block; object-fit: cover; }
.prize-card[data-rarity] .prize-image::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 18% 14%;
    border-radius: 50%;
    background: var(--rarity-color);
    filter: blur(28px);
    opacity: .12;
    pointer-events: none;
}
.prize-image::after { content: ""; position: absolute; z-index: 3; inset: auto 0 0; height: 40px; background: linear-gradient(transparent, var(--panel-deep)); }
.prize-card[data-rarity] .prize-image::after { background: linear-gradient(transparent, color-mix(in srgb, var(--panel-deep), var(--rarity-color) var(--rarity-wash))); }
.prize-copy { padding: 0 9px; }
.prize-preview .card-category { display: none; }
.prize-card strong { display: block; color: var(--white); }
.prize-preview .prize-card strong { min-height: 36px; font-size: 11px; line-height: 15px; font-weight: 600; }
.prize-card strong,
.prize-card small,
.detail-dialog h2,
.detail-dialog > p {
    overflow-wrap: anywhere;
}
.prize-card strong,
.prize-card small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.prize-card small { display: block; color: rgba(158,166,171,.72); }
.prize-preview .prize-card small { margin-top: 2px; font-size: 10px; line-height: 14px; }
.prize-card--all {
    appearance: none;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-color: rgba(255,212,0,.22);
    background:
        radial-gradient(circle at 50% 34%, rgba(255,212,0,.1), transparent 48%),
        linear-gradient(150deg, #111416, #050607);
    color: var(--white);
    text-align: center;
}
.prize-card--all .prize-card-all-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,212,0,.3);
    border-radius: 50%;
    background: rgba(255,212,0,.07);
    color: var(--yellow);
    font-size: 21px;
    line-height: 1;
    box-shadow: 0 0 24px rgba(255,212,0,.08);
}
.prize-preview .prize-card--all strong {
    min-height: 0;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
}

.winners-heading { height: 60px; padding-top: 15px; }
.live-badge {
    width: 50px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 15px;
    font-size: 8px;
    font-weight: 700;
}
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px var(--yellow); animation: live-pulse 1.8s ease-in-out infinite; }
@keyframes live-pulse { 0%,100% { opacity: .55; transform: scale(.82); } 45% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 16px var(--yellow); } }
.winner-list {
    position: relative;
    display: grid;
    gap: 8px;
    max-height: 432px;
    overflow: hidden;
}
.winner-list--fade::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    height: 148px;
    background: linear-gradient(180deg, rgba(2,4,4,0), rgba(2,4,4,.5) 23%, rgba(2,4,4,.9) 62%, var(--black));
    pointer-events: none;
}
.winner-row {
    position: relative;
    width: 390px;
    height: 102px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 88px;
    grid-template-areas:
        "avatar copy image"
        "label copy image";
    grid-template-rows: 48px 28px;
    column-gap: 10px;
    align-items: center;
    padding: 8px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 18px;
    background: linear-gradient(90deg, #0e1112, var(--panel-deep));
    box-shadow: 0 8px 18px rgba(0,0,0,.32);
}
.winner-row[data-rarity] {
    border-color: color-mix(in srgb, var(--rarity-color) 12%, transparent);
    background:
        radial-gradient(ellipse at 91% 48%, color-mix(in srgb, var(--rarity-color) var(--rarity-glow), transparent), transparent 42%),
        linear-gradient(105deg, #0e1112 0%, color-mix(in srgb, #0b0e0f, var(--rarity-color) var(--rarity-wash)) 58%, color-mix(in srgb, var(--panel-deep), var(--rarity-color) var(--rarity-wash)) 100%);
    box-shadow: 0 8px 18px rgba(0,0,0,.32), inset -34px 0 46px color-mix(in srgb, var(--rarity-color) 6%, transparent);
}
.winner-row:first-child { border-color: transparent; }
.winner-row.is-new {
    animation:
        winner-enter .55s cubic-bezier(.18,.8,.22,1) both,
        winner-notice 2.4s ease-out .16s forwards;
    animation-delay: calc(var(--row-index,0) * 80ms), .16s;
}
@keyframes winner-enter { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes winner-notice {
    0% { border-color: rgba(255,212,0,0); box-shadow: 0 8px 18px rgba(0,0,0,.32); }
    16% { border-color: rgba(255,212,0,.82); box-shadow: 0 8px 18px rgba(0,0,0,.32), 0 0 26px rgba(255,212,0,.3); }
    72% { border-color: rgba(255,212,0,.42); box-shadow: 0 8px 18px rgba(0,0,0,.32), 0 0 15px rgba(255,212,0,.14); }
    100% { border-color: transparent; box-shadow: 0 8px 18px rgba(0,0,0,.32); }
}
.winner-avatar {
    grid-area: avatar;
    align-self: start;
    position: relative;
    top: auto;
    left: auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: radial-gradient(circle at 50% 40%, #207be7, #00265b);
    font-size: 14px;
    font-weight: 700;
}
.winner-row:nth-child(2) .winner-avatar { background: radial-gradient(circle at 50% 40%, #19a96a, #00301b); }
.winner-copy {
    grid-area: copy;
    align-self: center;
    min-width: 0;
}
.winner-copy strong {
    display: block;
    overflow: hidden;
    color: var(--white);
    font-size: 13px;
    line-height: 16px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.winner-copy small {
    display: inline-flex;
    max-width: 100%;
    margin-top: 2px;
    padding: 4px 10px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    color: var(--muted);
    font-size: 9px;
    line-height: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.winner-label {
    grid-area: label;
    align-self: end;
    color: var(--yellow);
    font-size: 9px;
    line-height: 12px;
    font-weight: 800;
}
.winner-prize {
    display: block;
    max-width: 100%;
    margin-top: 7px;
    overflow: hidden;
    color: rgba(255,255,255,.88);
    font-size: 12px;
    line-height: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.winner-prize-image {
    grid-area: image;
    justify-self: end;
    align-self: center;
    position: relative;
    top: auto;
    right: auto;
    width: 88px;
    height: 78px;
    border: 1px solid rgba(255,212,0,.14);
    border-radius: 16px;
    object-fit: cover;
}

.screen-back { position: absolute; z-index: 10; top: 18px; left: 20px; width: 40px; height: 40px; padding: 0 0 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10,12,13,.78); color: var(--muted); font-size: 30px; line-height: 34px; cursor: pointer; }
.page-title { padding: 91px 20px 0; }
.page-title h1 { margin: 0; font-size: 25px; line-height: 30px; font-weight: 800; letter-spacing: -.4px; }
.page-title p { margin: 1px 0 0; color: var(--muted); font-size: 12px; line-height: 16px; }
.prizes-screen, .how-screen, .rewards-screen { position: relative; min-height: 1050px; padding-bottom: 36px; }

.category-tabs { display: flex; gap: 8px; margin: 20px 20px 20px; overflow-x: auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { height: 34px; flex: 0 0 auto; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 500; cursor: pointer; }
.category-tabs button.active { color: #050605; background: var(--yellow); border-color: var(--yellow); font-weight: 700; }
.prize-grid { display: grid; grid-template-columns: repeat(2, 190px); gap: 20px 10px; margin: 0 20px; }
.prize-grid .prize-card { width: 190px; height: 246px; border-radius: 18px; }
.screen--active .prize-grid .prize-card { animation: card-enter .42s cubic-bezier(.2,.75,.25,1) both; animation-delay: calc(var(--card-index,0) * 55ms); }
@keyframes card-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.prize-grid .prize-image { width: 190px; height: 164px; }
.prize-grid .prize-image::after { height: 50px; }
.prize-grid .prize-copy { padding: 0 13px; }
.prize-grid .card-category { display: block; margin-top: -15px; position: relative; color: var(--yellow); font-size: 9px; line-height: 12px; font-weight: 700; text-transform: uppercase; }
.prize-grid .prize-card strong { min-height: 34px; margin-top: 13px; font-size: 13px; line-height: 16px; font-weight: 600; }
.prize-grid .prize-card small { margin-top: 4px; font-size: 11px; line-height: 14px; }


.tasks-preview {
    width: 390px;
    margin: 19px auto 0;
    padding: 17px 14px 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg,#101416,#050607);
    box-shadow: 0 8px 18px rgba(0,0,0,.32);
}
.tasks-preview h2 {
    margin: 0 0 11px;
    color: var(--white);
    font-size: 13px;
    line-height: 17px;
    font-weight: 700;
}
.task-preview-list,
.mission-list {
    display: grid;
    gap: 0;
}
.task-row {
    position: relative;
    min-height: 56px;
    display: grid;
    grid-template-columns: 42px 1fr 31px 15px;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid var(--line);
    color: var(--white);
    animation: task-row-enter .38s cubic-bezier(.2,.75,.25,1) both;
    animation-delay: calc(var(--task-index,0) * 45ms);
}
.task-row:last-child { border-bottom: 0; }
@keyframes task-row-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.task-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--yellow-line);
    border-radius: 14px;
    background: rgba(255,212,0,.04);
    color: var(--yellow);
}
.task-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.task-copy strong {
    display: block;
    font-size: 13px;
    line-height: 17px;
    font-weight: 600;
}
.task-copy small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 14px;
}
.task-state {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: rgba(156,163,171,.44);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
    font-size: 14px;
    font-weight: 800;
}
.task-row--done .task-state {
    color: #050605;
    border-color: var(--yellow);
    background: var(--yellow);
    box-shadow: 0 0 16px rgba(255,212,0,.22);
}
.task-chevron {
    color: var(--muted);
    font-size: 25px;
    line-height: 1;
}
.tasks-more-button {
    width: 100%;
    min-height: 42px;
    margin-top: 14px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: transparent;
    color: var(--white);
    font-size: 11px;
    line-height: 14px;
    font-weight: 700;
    cursor: pointer;
}

.weekly-progress { height: 118px; margin: 20px 20px 20px; padding: 14px 16px; border: 1px solid var(--yellow-line); border-radius: 20px; background: linear-gradient(135deg,#111512,#050607); }
.weekly-progress > span { display: block; color: var(--yellow); font-size: 10px; line-height: 14px; font-weight: 700; }
.weekly-progress strong { display: block; margin-top: 3px; font-size: 26px; line-height: 34px; font-weight: 800; }
.weekly-progress p { margin: 0 0 9px; color: var(--muted); font-size: 11px; line-height: 18px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.08); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--yellow); }
.mission-list { display: grid; gap: 8px; margin: 0 20px; }
.mission-list .task-row {
    min-height: 64px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg,#101416,#050607);
}
.mission-card { position: relative; width: 390px; height: 116px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 15px 15px 11px 14px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg,#101416,#050607); }
.mission-card--done { border-color: var(--yellow-line); }
.mission-index { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--yellow-line); border-radius: 14px; color: var(--yellow); font-size: 12px; font-weight: 700; }
.mission-card--done .mission-index { color: #050605; border-color: var(--yellow); background: var(--yellow); }
.mission-card > div { min-width: 0; }
.mission-card strong { display: block; padding-right: 80px; font-size: 14px; line-height: 20px; font-weight: 600; }
.mission-card p { margin: 1px 0 14px; color: var(--muted); font-size: 10px; line-height: 16px; }
.mission-card b { display: block; margin-bottom: 9px; color: var(--muted); font-size: 9px; line-height: 12px; font-weight: 700; }
.mission-card--done b { color: var(--yellow); }
.mission-reward { position: absolute; top: 17px; right: 15px; color: var(--yellow); font-size: 10px; line-height: 14px; font-weight: 700; }
.tasks-footer { margin: 38px 20px 0; text-align: center; color: rgba(156,163,171,.66); font-size: 10px; line-height: 14px; }
.task-row--real {
    min-height: 76px;
    grid-template-columns: 42px minmax(0,1fr) auto;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.task-row--real .task-copy { min-width: 0; }
.task-row--real:hover { border-color: rgba(255,212,0,.28); }
.task-row--real:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.task-progress { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.task-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#d8a900,var(--yellow)); box-shadow: 0 0 10px rgba(255,212,0,.24); transition: width .35s ease; }
.task-row--claimable { border-color: var(--yellow-line); background: radial-gradient(circle at 80% 50%,rgba(255,212,0,.08),transparent 42%),linear-gradient(135deg,#101416,#050607); }
.task-row--claimable .task-icon { background: rgba(255,212,0,.12); box-shadow: 0 0 18px rgba(255,212,0,.1); }
.task-row--real .task-copy small { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; }
.task-row--real .task-copy small b { color: var(--yellow); font-size: 9px; }
.task-pending { flex-basis: 100%; color: #aeb6c2; }
.task-action,
.task-actions button {
    min-width: 72px;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--yellow-line);
    border-radius: 10px;
    background: rgba(255,212,0,.08);
    color: var(--yellow);
    font: inherit;
    font-size: 9px;
    line-height: 12px;
    font-weight: 800;
    cursor: pointer;
}
.task-action:disabled,
.task-actions button:disabled { opacity: .45; cursor: wait; }
.task-actions { display: grid; gap: 5px; }
.task-actions .task-action-secondary { border-color: var(--line); background: rgba(255,255,255,.03); color: var(--white); }
.task-wait { color: var(--muted); font-size: 9px; font-weight: 700; }
.task-finished { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: #050605; font-weight: 900; }
.task-preview-list .task-row--real { min-height: 70px; }
.task-preview-list .task-row--real .task-icon { width: 38px; height: 38px; border-radius: 12px; }
.task-preview-list .task-action,
.task-preview-list .task-actions button { min-width: 64px; padding-inline: 6px; }
.task-completed-section { margin-top: 32px; }
.task-completed-section > h2 { margin: 0 20px 12px; color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.mission-list--completed .task-row { opacity: .7; }
.mission-list .task-row--real { padding: 12px 13px; }
.task-empty { padding: 20px 8px; font-size: 11px; }
.tasks-placeholder { width: 390px; margin: 28px 20px 0; padding: 54px 28px 28px; border: 1px solid var(--yellow-line); border-radius: 24px; background: radial-gradient(circle at 50% 12%, rgba(255,212,0,.09), transparent 42%), linear-gradient(145deg,#101416,#050607); text-align: center; }
.tasks-placeholder-mark { width: 78px; height: 78px; display: grid; place-items: center; margin: 0 auto 25px; border: 1px solid var(--yellow-line); border-radius: 50%; color: var(--yellow); background: rgba(255,212,0,.05); box-shadow: 0 0 42px rgba(255,212,0,.12); font-size: 32px; font-weight: 700; }
.tasks-placeholder h2 { max-width: 285px; margin: 0 auto; font-size: 20px; line-height: 26px; font-weight: 800; }
.tasks-placeholder p { max-width: 300px; margin: 11px auto 31px; color: var(--muted); font-size: 12px; line-height: 19px; }
.tasks-placeholder button { width: 100%; min-height: 48px; }

.reward-list { display: grid; gap: 10px; margin: 0 20px; }
.reward-card { min-height: 92px; display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg,#101416,#050607); cursor: pointer; }
.reward-card[data-rarity] {
    border-color: color-mix(in srgb, var(--rarity-color) 15%, var(--line));
    background:
        radial-gradient(ellipse at 12% 50%, color-mix(in srgb, var(--rarity-color) var(--rarity-glow), transparent), transparent 34%),
        linear-gradient(112deg, color-mix(in srgb, #101416, var(--rarity-color) var(--rarity-wash)), #090c0d 58%, color-mix(in srgb, #050607, var(--rarity-color) var(--rarity-wash)));
    box-shadow: 0 9px 22px rgba(0,0,0,.3), inset 38px 0 50px color-mix(in srgb, var(--rarity-color) 5%, transparent);
}
.reward-art { position: relative; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: #050607; }
.reward-card[data-rarity] .reward-art::before {
    content: "";
    position: absolute;
    inset: 13%;
    border-radius: 50%;
    background: var(--rarity-color);
    filter: blur(18px);
    opacity: .15;
}
.reward-art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.reward-copy strong { display: block; font-size: 13px; line-height: 17px; }
.reward-copy small { color: var(--muted); font-size: 9px; }
.status-pill { display: inline-flex; min-height: 24px; align-items: center; padding: 5px 8px; border-radius: 12px; color: var(--yellow); background: rgba(255,212,0,.08); font-size: 8px; font-weight: 700; }
.status-pill[data-status="delivered"] { color: var(--success); background: rgba(67,209,122,.09); }
.status-pill[data-status="expired"], .status-pill[data-status="cancelled"] { color: var(--danger); background: rgba(255,108,95,.09); }
.empty-state { grid-column: 1 / -1; padding: 36px 18px; border: 1px solid var(--line); border-radius: 18px; color: var(--muted); text-align: center; font-size: 12px; line-height: 18px; }

.state-overlay { position: fixed; z-index: 80; inset: 0; min-height: 100vh; overflow-y: auto; text-align: center; }
.spinning-overlay {
    padding-top: 148px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 38%, rgba(255,212,0,.1), transparent 42%),
        linear-gradient(180deg, #020404, #030505 54%, #020404);
}
.spinning-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 42%, rgba(255,212,0,.1), transparent 48%);
    opacity: 0;
    transform: scale(.86);
    transition: opacity .42s ease, transform .58s cubic-bezier(.16,.84,.22,1);
    pointer-events: none;
}
.spinning-overlay h2, .result-overlay h2 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 800; }
.spinning-overlay > p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 22px; }
.focus-copy { position: relative; z-index: 2; opacity: 0; transform: translateY(10px); transition: opacity .36s ease .08s, transform .36s ease .08s; }
.focus-copy p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 22px; }
.focus-wheel-stage { position: relative; width: 100%; max-width: 430px; height: 224px; margin: 18px auto 0; overflow: visible; opacity: 0; transform: scale(.82); transition: opacity .38s ease, transform .52s cubic-bezier(.16,.84,.22,1); }
.drum-machine--focus { transform: none; transform-origin: 50% 50%; }
.drum-machine--focus .drum-window { top: 32px; height: 160px; }
.drum-machine--focus .drum-card { height: 160px; grid-template-rows: 84px 1fr; }
.drum-machine--focus .drum-pointer--top { top: 6px; }
.drum-machine--focus .drum-pointer--bottom { bottom: -1px; }
.spinning-overlay.is-active::before { opacity: 1; transform: scale(1); }
.spinning-overlay.is-active .focus-copy { opacity: 1; transform: none; }
.spinning-overlay.is-active .focus-wheel-stage { opacity: 1; transform: scale(1); }
.spinning-overlay.is-arming .focus-wheel-stage { transform: scale(1.045); }
.spinning-overlay.is-arming .drum-selection { box-shadow: 0 0 0 1px rgba(255,212,0,.26), 0 0 44px rgba(255,212,0,.74), inset 0 0 24px rgba(255,212,0,.14); }
.spinning-overlay.is-fast-roll .drum-card-art img {
    opacity: .78;
    filter: blur(.65px) drop-shadow(0 8px 8px rgba(0,0,0,.72));
}
.spinning-overlay.is-fast-roll .drum-card[data-rarity] .drum-card-art::before { opacity: .28; transform: scale(.78); }
.spinning-overlay.is-fast-roll .drum-card.is-cue-pass[data-rarity] {
    box-shadow:
        inset 0 -34px 42px color-mix(in srgb, var(--rarity-color) 14%, transparent),
        inset 0 0 24px color-mix(in srgb, var(--rarity-color) 11%, transparent);
}
.spinning-overlay.is-fast-roll .drum-card.is-cue-pass[data-rarity] .drum-card-art::before {
    opacity: 1;
    transform: scale(1.34);
}
.spinning-overlay.is-fast-roll .drum-card.is-cue-pass[data-rarity] .drum-card-art img {
    opacity: 1;
    filter: brightness(1.08) saturate(1.16) drop-shadow(0 8px 10px rgba(0,0,0,.72));
}
.spinning-overlay.is-fast-roll .drum-stage::after { opacity: .9; }
.spinning-overlay.is-decelerating .drum-card-art img {
    opacity: .92;
    filter: blur(.25px) drop-shadow(0 8px 8px rgba(0,0,0,.72));
}
.spinning-overlay.is-decelerating .drum-selection {
    box-shadow: 0 0 0 1px rgba(255,212,0,.28), 0 0 40px rgba(255,212,0,.72), inset 0 0 24px rgba(255,212,0,.14);
}
.spinning-overlay.is-final-lock .drum-card-art img {
    opacity: 1;
    filter: drop-shadow(0 8px 8px rgba(0,0,0,.72));
}
.spinning-overlay.is-final-lock .drum-card.is-selected[data-rarity] .drum-card-art::before {
    opacity: 1;
    transform: scale(1.25);
    animation: rarity-surface-lock .74s cubic-bezier(.16,.84,.22,1) both;
}
@keyframes rarity-surface-lock {
    0% { opacity: .32; transform: scale(.82); }
    48% { opacity: 1; transform: scale(1.34); }
    100% { opacity: 1; transform: scale(1.25); }
}
.spinning-overlay.is-final-lock .drum-stage::after { opacity: 1; }
.spinning-overlay .drum-pointer.is-ticking {
    animation: pointer-tick-strong .12s cubic-bezier(.18,.86,.25,1);
}
@keyframes pointer-tick-strong {
    0% { transform: translateX(-50%) scale(1) rotate(0); filter: drop-shadow(0 0 10px rgba(255,212,0,.72)); }
    42% { transform: translateX(-50%) scale(1.16) rotate(9deg); filter: drop-shadow(0 0 18px rgba(255,212,0,.95)); }
    100% { transform: translateX(-50%) scale(1) rotate(0); filter: drop-shadow(0 0 10px rgba(255,212,0,.72)); }
}
#spin-skip { width: 350px; min-height: 52px; margin: 18px auto 0; color: rgba(156,163,171,.68); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .28s ease, transform .28s ease; }
.spinning-overlay.is-skip-ready #spin-skip { opacity: 1; pointer-events: auto; transform: none; }

.result-overlay { min-height: 100dvh; padding: max(88px, calc(env(safe-area-inset-top) + 78px)) 20px 44px; }
.result-back {
    position: absolute;
    z-index: 3;
    top: max(18px, calc(env(safe-area-inset-top) + 12px));
    left: 20px;
    width: 40px;
    height: 40px;
    padding: 0 0 4px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(10,12,13,.78);
    color: var(--muted);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}
.result-back:active { border-color: var(--yellow-line); color: var(--white); transform: translateY(1px); }
.result-subtitle { margin: 3px 0 27px; color: var(--muted); font-size: 13px; line-height: 22px; }
.result-art-shell {
    position: relative;
    width: 240px;
    margin: 0 auto 31px;
    isolation: isolate;
}
.result-art-shell::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 22px;
    border-radius: 34px;
    background: var(--rarity-color, transparent);
    filter: blur(32px);
    opacity: .2;
    transform: scale(.9);
    animation: result-rarity-bloom .7s cubic-bezier(.16,.84,.22,1) both;
    pointer-events: none;
}
.result-overlay[data-rarity="common"] .result-art-shell::before { display: none; }
.result-art { width: 240px; height: 240px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--rarity-color, transparent) 36%, rgba(255,255,255,.08)); border-radius: 22px; background: #050607; box-shadow: 0 18px 45px rgba(0,0,0,.42); }
.result-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.result-rarity {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: -13px;
    min-height: 27px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid color-mix(in srgb, var(--rarity-color) 40%, rgba(255,255,255,.08));
    border-radius: 999px;
    background: color-mix(in srgb, #080a0b 92%, var(--rarity-color) 8%);
    box-shadow: 0 8px 22px rgba(0,0,0,.5), 0 0 18px color-mix(in srgb, var(--rarity-color) 13%, transparent);
    color: color-mix(in srgb, var(--rarity-color) 72%, white 28%);
    font-size: 9px;
    line-height: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    transform: translateX(-50%);
}
@keyframes result-rarity-bloom {
    from { opacity: 0; transform: scale(.68); }
    to { opacity: .2; transform: scale(.9); }
}
.result-summary {
    width: min(100%, 320px);
    min-height: 94px;
    margin: 0 auto;
    padding: 13px 16px 15px;
    display: grid;
    align-content: center;
    gap: 4px;
    border: 1px solid var(--yellow-line);
    border-radius: 16px;
    background: linear-gradient(135deg,#101416,#050607);
    overflow: hidden;
}
.result-summary span {
    display: block;
    color: var(--yellow);
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.result-summary strong {
    display: -webkit-box;
    max-width: 100%;
    color: var(--white);
    font-size: clamp(22px, 7vw, 29px);
    line-height: 1.12;
    font-weight: 800;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.result-summary p {
    margin: 0 auto;
    max-width: 100%;
    color: var(--muted);
    font-size: 10px;
    line-height: 14px;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.result-actions { width: min(100%, 350px); margin: 46px auto 0; display: grid; gap: 14px; }
.result-actions .secondary-button { min-height: 52px; }
.result-helper { margin: 22px 30px 0; color: rgba(156,163,171,.62); font-size: 10px; line-height: 16px; }

.detail-dialog { position: fixed; inset: auto 0 26px; width: min(calc(100% - 32px),398px); min-height: 485px; max-height: calc(100vh - 42px); margin: 0 auto; padding: 41px 24px 45px; overflow-y: auto; color: var(--white); border: 1px solid var(--yellow-line); border-radius: 24px; background: linear-gradient(135deg,#111517,#050607); box-shadow: 0 26px 90px rgba(0,0,0,.8); text-align: center; }
.detail-dialog[data-rarity] {
    border-color: color-mix(in srgb, var(--rarity-color) 18%, var(--yellow-line));
    background:
        radial-gradient(ellipse at 50% 18%, color-mix(in srgb, var(--rarity-color) var(--rarity-glow), transparent), transparent 42%),
        linear-gradient(145deg, color-mix(in srgb, #111517, var(--rarity-color) var(--rarity-wash)), #080b0c 58%, color-mix(in srgb, #050607, var(--rarity-color) var(--rarity-wash)));
    box-shadow: 0 26px 90px rgba(0,0,0,.8), inset 0 44px 72px color-mix(in srgb, var(--rarity-color) 5%, transparent);
}
.detail-dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(3px); }
.sheet-handle { position: absolute; top: 9px; left: 50%; width: 68px; height: 4px; border-radius: 3px; background: rgba(156,163,171,.38); transform: translateX(-50%); }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 25px; line-height: 34px; cursor: pointer; }
.detail-art { position: relative; width: 200px; height: 200px; margin: 0 auto 20px; overflow: hidden; border-radius: 18px; background: var(--black); }
.detail-dialog[data-rarity] .detail-art {
    border: 1px solid color-mix(in srgb, var(--rarity-color) 18%, rgba(255,255,255,.05));
    box-shadow: 0 16px 38px rgba(0,0,0,.38), inset 0 0 30px color-mix(in srgb, var(--rarity-color) 7%, transparent);
}
.detail-dialog[data-rarity] .detail-art::before {
    content: "";
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background: var(--rarity-color);
    filter: blur(32px);
    opacity: .14;
}
.detail-art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.detail-dialog h2 { margin: 0; font-size: 22px; line-height: 32px; font-weight: 700; }
.detail-dialog > p { margin: 5px 0 20px; color: var(--muted); font-size: 12px; line-height: 18px; }
.detail-dialog .status-pill { margin: 0 0 14px; }
.detail-dialog #activation-locations-button { width: 100%; min-height: 46px; margin-top: 9px; }
.activation-locations-dialog { min-height: 0; text-align: left; }
.activation-locations-dialog h2 { text-align: left; }
.activation-kicker { margin-bottom: 4px !important; color: var(--yellow) !important; font-size: 9px !important; font-weight: 800; letter-spacing: 1.2px; }
.activation-locations-list { display: grid; gap: 18px; }
.city-search { position: relative; display: grid; gap: 6px; margin: 0 0 16px; }
.city-search label { color: var(--muted); font-size: 10px; font-weight: 700; }
.city-search input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: rgba(255,255,255,.035); color: var(--white); font: inherit; font-size: 12px; }
.city-search input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,212,0,.08); }
.city-suggestions { position: absolute; z-index: 20; top: calc(100% + 2px); left: 0; right: 0; max-height: 230px; overflow-y: auto; padding: 5px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: #111516; box-shadow: 0 16px 36px rgba(0,0,0,.42); }
.city-suggestion { width: 100%; display: grid; gap: 2px; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--white); text-align: left; cursor: pointer; }
.city-suggestion:hover, .city-suggestion:focus-visible, .city-suggestion[aria-selected="true"] { background: rgba(255,212,0,.09); outline: none; }
.city-suggestion strong { font-size: 12px; }
.city-suggestion span { color: var(--muted); font-size: 10px; }
.city-suggestions-attribution { padding: 5px 10px 4px; color: var(--muted); font-size: 8px; text-align: right; }
.city-suggestions-attribution a { color: inherit; }
.activation-city { display: grid; gap: 9px; }
.activation-city h3 { margin: 0; color: var(--yellow); font-size: 12px; text-transform: uppercase; }
.activation-location { display: grid; gap: 5px; padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.035); }
.activation-location strong { font-size: 13px; }
.activation-location span, .activation-location a { color: var(--muted); font-size: 11px; line-height: 16px; }
.activation-location a { color: var(--yellow); text-decoration: none; }
.activation-empty { padding: 18px; border: 1px dashed rgba(255,255,255,.13); border-radius: 13px; color: var(--muted); font-size: 11px; line-height: 17px; text-align: center; }
.missing-city-button { width: 100%; min-height: 42px; margin-top: 14px; border: 1px solid rgba(255,212,0,.34); border-radius: 12px; background: rgba(255,212,0,.06); color: var(--yellow); font-size: 11px; font-weight: 800; }
.requested-city-note { margin: 10px 0 0 !important; color: var(--muted); font-size: 10px !important; text-align: center; }
.city-demand-dialog { min-height: 0; text-align: left; }
.city-demand-dialog h2 { text-align: left; }
.city-demand-dialog form { display: grid; }
.city-demand-selection { min-height: 17px; margin: -7px 0 14px !important; color: var(--muted); font-size: 10px !important; }
.city-demand-selection.is-selected { color: var(--yellow); }
.task-detail-dialog { min-height: 0; padding-bottom: 24px; text-align: left; }
.task-detail-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 2px auto 13px; border: 1px solid var(--yellow-line); border-radius: 19px; background: rgba(255,212,0,.07); color: var(--yellow); box-shadow: 0 0 28px rgba(255,212,0,.09); }
.task-detail-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-detail-kicker { margin: 0 0 4px !important; color: var(--yellow) !important; font-size: 9px !important; line-height: 12px !important; font-weight: 800; letter-spacing: .08em; text-align: center; }
.task-detail-dialog h2 { text-align: center; }
.task-detail-description { max-width: 320px; margin: 5px auto 20px !important; text-align: center; }
.task-detail-progress-block { margin: 0 0 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.task-detail-progress-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 10px; line-height: 14px; }
.task-detail-progress-head strong { color: var(--white); font-weight: 700; }
.task-detail-progress-block--done .task-detail-progress-head strong { color: var(--yellow); }
.task-detail-instructions { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.task-detail-instructions h3 { margin: 0 0 7px; color: var(--white); font-size: 12px; line-height: 16px; }
.task-detail-instructions p { margin: 0; color: var(--muted); font-size: 11px; line-height: 18px; }
.task-detail-reward { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 16px; padding: 0 2px; color: var(--muted); font-size: 10px; }
.task-detail-reward strong { color: var(--yellow); font-size: 13px; }
.task-detail-actions { display: grid; gap: 8px; }
.task-detail-actions .primary-button,
.task-detail-actions .secondary-button { width: 100%; min-height: 46px; }
.secret-panel { display: grid; gap: 6px; margin-bottom: 14px; padding: 12px; border: 1px dashed var(--yellow-line); border-radius: 12px; text-align: left; }
.detail-dialog[data-rarity] .secret-panel {
    border-color: color-mix(in srgb, var(--rarity-color) 18%, var(--yellow-line));
    background: color-mix(in srgb, #080a0b, var(--rarity-color) var(--rarity-wash));
}
.secret-panel span { color: var(--muted); font-size: 9px; }
.secret-panel .qr-image { width: 168px; max-width: 100%; margin: 4px auto 6px; padding: 8px; border-radius: 14px; background: #fff; }
.secret-panel .qr-hint { margin: 0; color: var(--muted); font-size: 10px; line-height: 15px; text-align: center; }
.secret-panel strong { color: var(--yellow); font-size: 16px; word-break: break-all; }
.secret-panel button { justify-self: start; padding: 0; border: 0; background: none; color: var(--yellow); font-size: 10px; }
.visibility-toggle, .consent { display: flex; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 10px; line-height: 15px; text-align: left; }
.visibility-toggle input, .consent input { accent-color: var(--yellow); }
.claim-dialog { text-align: left; }
.claim-dialog h2 { margin-top: 12px; text-align: center; }
.claim-dialog > p { text-align: center; }
.claim-dialog form { display: grid; gap: 11px; }
.claim-dialog form > label:not(.consent) { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.claim-dialog input, .claim-dialog textarea { width: 100%; padding: 11px; color: var(--white); border: 1px solid var(--line); border-radius: 12px; outline: none; background: rgba(255,255,255,.035); resize: vertical; }
.claim-dialog input:focus, .claim-dialog textarea:focus { border-color: var(--yellow); }

.toast { position: fixed; z-index: 120; left: 50%; bottom: 20px; width: min(calc(100% - 32px),398px); padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #15191b; color: var(--white); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%,16px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

@media (max-width: 429px) {
    .tasks-preview,
    .winner-row,
    .mission-card,
    .tasks-placeholder {
        width: calc(100vw - 40px);
    }
    .prize-grid {
        grid-template-columns: repeat(2, calc((100vw - 50px) / 2));
    }
    .prize-grid .prize-card,
    .prize-grid .prize-image {
        width: 100%;
    }
}

@media (max-width: 389px) {
    .home-screen { padding-left: 16px; padding-right: 16px; }
    .spin-button, .spinning-overlay button, .result-actions { width: calc(100% - 48px); }
    .home-hero { padding-left: 0; padding-right: 0; }
    .home-hero h1 { font-size: 24px; line-height: 29px; }
    .drum-stage { width: calc(100% + 32px); margin-left: -16px; margin-right: -16px; }
    .drum-window, .focus-wheel-stage { width: 100%; }
    .tasks-preview { width: calc(100vw - 32px); }
    .prize-preview { width: calc(100% + 16px); margin-right: -16px; padding-right: 16px; }
    .winner-row, .mission-card, .tasks-placeholder { width: calc(100vw - 40px); }
    .prize-grid { grid-template-columns: repeat(2, calc((100vw - 50px) / 2)); }
    .prize-grid .prize-card, .prize-grid .prize-image { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
