/* Reference artwork: x06-purple. Layers: stage, disc, rim/pointer, center, controls. */
body.br-modal-open { overflow: hidden !important; }
.br-modal[hidden], .br-modal [hidden] { display: none !important; }
.br-modal {
    --br-accent: #91e8ff;
    --br-accent-rgb: 145, 232, 255;
    --br-hue: 0deg;
    position: fixed; inset: 0; z-index: 12000;
    display: grid; place-items: center; padding: 12px;
    font-family: inherit; color: #f7fbff;
}
.br-backdrop { position: absolute; inset: 0; border: 0; background: rgba(4, 4, 12, .8); }
.br-shell {
    position: relative; isolation: isolate; width: min(600px, 100%);
    max-height: calc(100dvh - 24px); overflow: hidden auto; overscroll-behavior: contain;
    border-radius: 18px; background: #111343 url('x06-purple/main_bg.jpg') center top / 100% auto no-repeat;
    box-shadow: 0 24px 90px rgba(5, 3, 24, .65);
    scrollbar-width: thin; scrollbar-color: #6964aa #111343;
    animation: br-shell-in .3s cubic-bezier(.16,1,.3,1) both;
}
@keyframes br-shell-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.br-top-actions { position: sticky; top: 14px; z-index: 12; height: 0; display: flex; justify-content: flex-end; gap: 8px; padding-right: 16px; }
.br-modal .br-icon-button {
    display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px;
    border: 0; border-radius: 9px; background: #343064; color: #f7fbff;
    cursor: pointer; font-family: inherit; font-size: 24px; font-weight: 800; line-height: 1;
    transition: transform .18s ease, background .18s ease;
}
.br-icon-button:hover { background: #514780; }
.br-icon-button:active { transform: scale(.96); }
.br-modal button:focus-visible { outline: 3px solid #ffe67a; outline-offset: 3px; }
.br-wheel-side { position: relative; min-width: 0; padding: 30px 8px 0; }
.br-headline { text-align: center; padding: 0 80px; }
.br-headline h2 { margin: 0; padding-bottom: 4px; font-size: clamp(27px, 5.4vw, 40px); font-weight: 950; font-style: italic; line-height: 1.1; letter-spacing: -.035em; text-shadow: 0 3px 0 #747bab; }
.br-prize-caption { margin: 8px 0 2px; color: #e2e7ff; font-size: 13px; font-weight: 700; }
.br-max-prize {
    display: block; font-size: clamp(30px, 6vw, 46px); font-weight: 950; font-style: italic; line-height: 1.15;
    letter-spacing: -.04em; color: #8ae9ff; text-shadow: 0 2px 0 #2858b8, 0 3px 0 #e6f3ff;
    padding-bottom: 6px; font-variant-numeric: tabular-nums;
}
.br-spin-status {
    width: fit-content; max-width: 90%; min-width: 50%; margin: 14px auto 0; padding: 8px 20px;
    border: 1px solid #6766a0; border-radius: 999px; background: rgba(23, 22, 67, .65);
    text-align: center; font-size: clamp(14px, 3.5vw, 21px); font-weight: 700; line-height: 1.25;
}
.br-spin-status span { color: #ffe76b; font-weight: 900; }
.br-wheel-stage { position: relative; margin-top: -7px; isolation: isolate; }
.br-wheel-base { position: absolute; inset: auto -8px -7%; width: calc(100% + 16px); height: auto; pointer-events: none; z-index: -1; }
.br-wheel-halo { position: relative; width: 100%; aspect-ratio: 1; container-type: inline-size; }
.br-wheel {
    position: absolute; width: 79.7%; aspect-ratio: 1; left: 10.3%; top: 12.8%;
    border-radius: 50%; overflow: hidden; background: conic-gradient(#003ba7, #081555, #003ba7);
    transition: transform 4.2s cubic-bezier(.12,.68,.08,1);
}
.br-wheel.is-spinning { will-change: transform; }
.br-wheel-art { position: absolute; inset: 0; width: 100%; height: 100%; filter: hue-rotate(var(--br-hue)); pointer-events: none; }
.br-wheel-art[hidden] { display: none; }
.br-wheel-rim, .br-wheel-pointer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.br-wheel-rim { filter: hue-rotate(var(--br-hue)); }
.br-wheel-pointer { clip-path: polygon(40% 0, 60% 0, 60% 20%, 40% 20%); }
.br-wheel-labels { position: absolute; inset: 0; border-radius: 50%; }
.br-wheel-label {
    --label-angle: 0deg; position: absolute; left: 50%; top: 50%; width: 32%; height: 12%;
    display: grid; place-items: center; text-align: center; overflow-wrap: anywhere;
    color: #f7fbff; font-size: clamp(9px, 3.2cqw, 19px); font-weight: 900; line-height: 1.08;
    text-shadow: 0 1px 3px #140943;
    transform: translate(-50%, -50%) rotate(var(--label-angle)) translateY(-27cqw) rotate(90deg);
}
.br-center-ring { position: absolute; left: 50.15%; top: 52.65%; width: 29%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.br-modal .br-spin-button {
    position: absolute; left: 50.15%; top: 52.65%; transform: translate(-50%, -50%);
    width: 22%; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0;
    display: grid; place-items: center; background: #0b236a; color: #f7fbff; cursor: pointer;
    font-family: inherit; font-size: clamp(14px, 4.7cqw, 28px); font-weight: 950; line-height: .98;
    text-transform: uppercase; transition: transform .18s ease, opacity .18s ease;
}
.br-spin-button::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: url('x06-purple/spin_button_lucky.png') center / contain no-repeat; filter: hue-rotate(var(--br-hue)); }
.br-spin-button span { position: relative; }
.br-spin-button:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.04); }
.br-spin-button:active:not(:disabled) { transform: translate(-50%, -50%) scale(.97); }
.br-spin-button:disabled { cursor: not-allowed; opacity: .75; }
.br-spin-button.is-spinning { font-size: clamp(10px, 3.2cqw, 19px); }
.br-tiers { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: -5px 0 0; }
.br-modal .br-tier {
    min-width: 0; aspect-ratio: 375 / 204; border: 0; padding: 12px 8px; border-radius: 12px;
    position: relative; display: flex; flex-direction: column; justify-content: center; gap: 8px;
    background: transparent; color: #f7fbff; text-align: center; cursor: pointer;
    font-family: inherit; transition: transform .18s ease;
}
.br-tier::before { content: ''; position: absolute; inset: 0; background: url('x06-purple/level_btn_default_super.png') center / 100% 100% no-repeat; }
.br-tier[data-level="3"]::before { background-image: url('x06-purple/level_btn_default_mega.png'); }
.br-tier.is-active::before { background-image: url('x06-purple/level_btn_lucky.png'); filter: hue-rotate(var(--br-hue)); }
.br-tier:not(:disabled):hover { transform: translateY(-2px); }
.br-tier:disabled { cursor: not-allowed; color: #a4acd1; }
.br-tier-card, .br-tier-kicker { position: relative; display: block; }
.br-tier-card { font-size: clamp(12px, 3.1vw, 19px); font-weight: 850; line-height: 1.05; }
.br-tier-kicker { font-size: clamp(10px, 2.7vw, 16px); font-weight: 700; line-height: 1.1; }
.br-tier-kicker strong { color: var(--br-accent); }
.br-tier-lock { font-size: 9px; margin-left: 4px; }
.br-wheel-caption { position: relative; margin: 12px 0 0; text-align: center; color: #d5d9f4; font-size: 12px; }
.br-wheel-caption strong { color: #f7fbff; }
.br-info-side { min-width: 0; padding: 14px 16px 20px; }
.br-vip-summary { margin: 0; text-align: center; color: #d5d9f4; font-size: 12px; line-height: 1.4; }
.br-alert { display: none; margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #321e45; border: 1px solid #a276aa; color: #ffd9e6; font-size: 13px; font-weight: 650; }
.br-alert.is-visible { display: block; }
.br-result, .br-help { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: rgba(9, 8, 30, .9); }
.br-result-card { width: min(390px, 100%); box-sizing: border-box; padding: 30px 24px; border: 1px solid var(--br-accent); border-radius: 18px; background: #171540; text-align: center; animation: br-shell-in .3s ease both; }
.br-result-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: #35215c; color: #ffe76b; font-size: 30px; }
.br-result-card h3 { margin: 0 0 8px; font-size: 16px; color: #d5d9f4; }
.br-result-prize { margin: 0 0 22px; font-size: 28px; font-weight: 900; color: #f7fbff; }
.br-modal .br-result-card button { width: 100%; border: 0; border-radius: 10px; padding: 13px 18px; background: #eedbff; color: #281342; font-family: inherit; font-weight: 900; cursor: pointer; }
.br-help { z-index: 25; }
.br-help-panel { position: relative; width: 100%; max-height: calc(100dvh - 60px); overflow: auto; border: 1px solid #6766a0; border-radius: 18px; background: #171540; color: #e2e4f7; }
.br-help-close { position: sticky; top: 12px; float: right; margin: 12px 12px -48px 0; }
.br-help-content { padding: 30px 26px; text-align: center; }
.br-help-hero { width: 110px; aspect-ratio: 1; margin: 0 auto 16px; }
.br-help-hero img, .br-help-visual img { width: 100%; height: 100%; object-fit: contain; }
.br-help-content > p, .br-help-step p { margin: 0 auto 20px; max-width: 450px; color: #d5d9f4; font-size: 14px; line-height: 1.5; }
.br-help-content h2 { margin: 0 0 20px; font-size: 21px; }
.br-help-step { padding: 20px 0; }
.br-help-step + .br-help-step { border-top: 1px solid #45416b; }
.br-help-step h3 { margin: 0 0 16px; color: #ffe76b; font-size: 18px; }
.br-help-visual { width: 130px; height: 130px; margin: 0 auto 16px; position: relative; }
.br-help-clock { position: absolute; right: 0; bottom: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #ffe76b; color: #281342; font-size: 20px; }
.br-help-levels { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.br-help-levels span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #9edbff; background: #252052; font-size: 20px; font-weight: 850; }
.br-skeleton { animation: br-pulse 1s ease-in-out infinite alternate; }
@keyframes br-pulse { to { opacity: .55; } }
/* Fit the complete desktop composition to the available height. Mobile keeps its original scale. */
@media (min-width: 641px) {
    .br-shell { width: min(600px, calc(60dvh - 80px), 100%); container-type: inline-size; }
    .br-headline { padding-inline: clamp(42px, 13.3cqw, 80px); }
    .br-headline h2 { font-size: clamp(24px, 6.7cqw, 40px); }
    .br-max-prize { font-size: clamp(28px, 7.7cqw, 46px); }
    .br-spin-status { font-size: clamp(14px, 3.5cqw, 21px); }
    .br-modal .br-tier { padding: clamp(6px, 2cqw, 12px) 6px; gap: 6px; }
    .br-tier-card { font-size: clamp(11px, 3.2cqw, 19px); }
    .br-tier-kicker { font-size: clamp(10px, 2.7cqw, 16px); }
}
@media (min-width: 641px) and (max-height: 700px) {
    .br-wheel-side { padding-top: 42px; }
    .br-headline { padding-inline: 20px; }
    .br-headline h2 { font-size: 22px; }
    .br-top-actions { top: 10px; }
    .br-modal .br-icon-button { width: 28px; height: 28px; flex-basis: 28px; font-size: 20px; }
    .br-spin-status { margin-top: 8px; }
    .br-info-side { padding-block: 6px 12px; }
}
@media (max-width: 640px) {
    .br-modal { padding: 0; }
    .br-shell { max-height: 100dvh; border-radius: 0; }
    .br-wheel-side { padding-top: 28px; }
    .br-headline { padding-inline: 70px; }
    .br-top-actions { top: 12px; padding-right: 10px; gap: 6px; }
    .br-modal .br-icon-button { width: 30px; height: 30px; flex-basis: 30px; font-size: 21px; }
    .br-modal .br-tier { gap: 6px; padding: 9px 6px; }
    .br-info-side { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .br-shell, .br-result-card, .br-skeleton { animation: none; }
    .br-wheel { transition-duration: .01ms; }
    .br-modal button { transition: none; }
}
