* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: #77305f;
    font: 16px/1.45 system-ui, sans-serif;
}
.game {
    margin: auto;
    max-width: 640px;
    min-height: 100vh;
    padding: 16px 20px 48px;
    background: url("../images/game-bg.png") center top / 100% auto no-repeat;
    color: white;
    text-align: center;
}
.toolbar { display: flex; justify-content: flex-end; }
select, button { font: inherit; }
select { padding: 6px 10px; border-radius: 8px; }
h1 {
    margin: 14px 0 0;
    font-size: clamp(2rem, 7vw, 3.8rem);
    color: #fff4c5;
    text-shadow: 0 3px 2px #831032;
}
#count { margin: 8px 0 24px; font-weight: 600; }
.wheel-box {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 540px);
    aspect-ratio: 1;
    margin: auto;
    container-type: inline-size;
}
#wheel {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: clamp(7px, 2.5cqw, 14px) solid #ffbb54;
    background: repeating-conic-gradient(#fff5d5 0deg 45deg, #ed315b 45deg 90deg);
    box-shadow: 0 6px 0 #ab123f, 0 12px 30px #4e193780;
}
.sector-label {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--label-width, 22%);
    color: #830d31;
    font-weight: 750;
    font-size: clamp(10px, 3.2cqw, 17px);
    line-height: 1.15;
    overflow-wrap: anywhere;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-32cqw);
}
.pointer {
    position: absolute;
    z-index: 1;
    top: -7px;
    width: 8%;
    height: 10%;
    background: #76112f;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
#spin, #claim {
    border: 0;
    color: #590f27;
    background: #ffdc75;
    font-weight: 750;
    cursor: pointer;
}
#spin {
    position: relative;
    width: 23%;
    aspect-ratio: 1;
    border: 4px solid #fff4bf;
    border-radius: 50%;
    font-size: clamp(12px, 3.8cqw, 20px);
    box-shadow: 0 4px 10px #57182b80;
}
#spin:disabled { cursor: default; opacity: .82; }
dialog {
    width: min(420px, calc(100% - 32px));
    border: 0;
    border-radius: 20px;
    padding: 28px;
    color: #4d1329;
    background: #fff9ef;
    text-align: center;
    box-shadow: 0 18px 60px #2d102b70;
}
dialog::backdrop { background: #2d102bb3; }
dialog h2 { margin: 0; font-size: 1.45rem; }
#prize { margin: 12px 0 20px; font-size: 1.25rem; font-weight: 700; }
#claim { display: block; padding: 12px 18px; border-radius: 10px; text-decoration: none; }
#claim[hidden], #claim-status:empty { display: none; }
#close {
    margin-top: 14px;
    padding: 6px 14px;
    border: 1px solid #a76a7f;
    border-radius: 8px;
    color: inherit;
    background: transparent;
    cursor: pointer;
}
#game-status:empty, #prize-image[hidden] { display: none; }
#game-status { margin: 0 0 16px; }
#retry { margin-bottom: 16px; padding: 6px 14px; border: 0; border-radius: 8px; cursor: pointer; }
#prize-image { display: block; width: 100%; max-height: 180px; object-fit: contain; margin-bottom: 16px; }
.event-notice {
    max-width: 540px;
    margin: 28px auto 0;
    font-size: .875rem;
    color: #fff4ef;
}
.event-notice p { margin: 6px 0 0; }
