/* Колесо фортуны: /random/wheel/ */
.wheel-app { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 28px; align-items: start; margin-top: 8px; }
.wheel-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; background: #f0f0f7; border-radius: 24px; padding: 28px 20px; overflow: hidden; }
.wheel-box { position: relative; width: min(460px, 100%); aspect-ratio: 1; }
.wheel-box canvas { display: block; width: 100%; height: 100%; border-radius: 50%; cursor: pointer; box-shadow: 0 14px 34px rgba(20, 15, 60, .18); outline: none; }
.wheel-box canvas:focus-visible { box-shadow: 0 0 0 4px rgba(102, 85, 219, .45), 0 14px 34px rgba(20, 15, 60, .18); }
.wheel-arrow { position: absolute; z-index: 3; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 17px solid transparent; border-right: 17px solid transparent; border-top: 34px solid #ff5b3b; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); pointer-events: none; }
.rs .wheel-box .wheel-hub { position: absolute; z-index: 2; left: 50%; top: 50%; width: 15%; height: 15%; min-width: 44px; min-height: 44px; aspect-ratio: auto; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 3px 12px rgba(13, 7, 45, .22); display: grid; place-items: center; color: #6655db; font-size: 18px; pointer-events: none; }
.wheel-stage .btn-generate { width: min(460px, 100%); margin: 0; }
.wheel-stage .btn-generate:disabled { opacity: .65; cursor: default; }
.wheel-stage-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wheel-share { width: min(460px, 100%); display: grid; gap: 6px; font-size: 13px; color: #57536d; }
.wheel-share input { width: 100%; box-sizing: border-box; border: 1px solid #d9d7e6; border-radius: 10px; padding: 9px 12px; font-size: 13px; background: #fff; color: #0d072d; }
.wheel-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; }

.wheel-result { display: none; width: min(460px, 100%); background: #fff; border-radius: 18px; padding: 18px 20px; text-align: center; box-shadow: 0 8px 24px rgba(20, 15, 60, .08); }
.wheel-result.show { display: block; animation: wheelPop .35s ease; }
.wheel-result-label { font-size: 14px; color: #57536d; margin: 0 0 4px; }
.wheel-result-name { font: 500 28px/1.25 'Geologica', 'Inter', sans-serif; color: #0d072d; word-break: break-word; margin: 0; }
.wheel-result .rs-result-actions { justify-content: center; }
@keyframes wheelPop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

.wheel-panel { display: flex; flex-direction: column; gap: 16px; }
.wheel-panel .settings-card { padding: 20px; margin: 0; }
.wheel-panel textarea { width: 100%; min-height: 220px; resize: vertical; font: 16px/1.5 'Inter', sans-serif; border: 1px solid #d9d7e6; border-radius: 12px; padding: 12px 14px; background: #fff; box-sizing: border-box; }
.wheel-panel textarea:focus { outline: none; border-color: #6655db; box-shadow: 0 0 0 3px rgba(102, 85, 219, .15); }
.wheel-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.wheel-list-head label { font-weight: 600; font-size: 15px; }
.wheel-count { font-size: 13px; color: #57536d; white-space: nowrap; }
.wheel-list-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wheel-list-tools select { grid-column: 1 / -1; width: 100%; border: 1px solid #171039; background: #fff; color: #171039; border-radius: 10px; padding: 9px 10px; font-size: 14px; cursor: pointer; }
body.inner-page .rs .wheel-list-tools .rs-secondary-btn { width: 100%; min-width: 0; min-height: 40px; padding: 8px 2px; font: 400 13px/18px 'Inter', sans-serif !important; white-space: nowrap; }
body.inner-page .rs .wheel-stage-tools .rs-secondary-btn { min-height: 42px; padding: 8px 14px; font: 400 14px/20px 'Inter', sans-serif !important; }
.wheel-options { display: grid; gap: 10px; }
body.inner-page .wheel-options .rs-check { align-items: flex-start; line-height: 1.35; }
body.inner-page .wheel-options .rs-check input[type='checkbox'] { flex: 0 0 20px; margin-top: 0; }
.wheel-weights { margin-top: 4px; }
.wheel-weights-hint { font-size: 13px; color: #57536d; margin: 0 0 10px; }
.wheel-weights-list { display: grid; gap: 6px; max-height: 280px; overflow: auto; padding-right: 4px; }
.wheel-weight-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 56px; gap: 8px; align-items: center; font-size: 14px; }
.wheel-weight-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wheel-weight-row input { width: 100%; border: 1px solid #d9d7e6; border-radius: 8px; padding: 6px 8px; font-size: 14px; box-sizing: border-box; }
.wheel-weight-pct { text-align: right; color: #57536d; font-variant-numeric: tabular-nums; }
.wheel-history h3 { font-size: 16px; margin: 0 0 8px; }
.wheel-history ol { margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.6; color: #0d072d; }

.wheel-stage.is-full { position: fixed; inset: 0; z-index: 1000; border-radius: 0; justify-content: center; background: #f0f0f7; }
.wheel-stage.is-full .wheel-box { width: min(86vh, 92vw); }
.wheel-stage.is-full .btn-generate,
.wheel-stage.is-full .wheel-result { width: min(520px, 92vw); }
body.wheel-full-open { overflow: hidden; }

.wheel-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; background: #0d072d; color: #fff; border-radius: 24px; padding: 28px 32px; margin: 40px 0; }
.wheel-cta h2 { color: #fff; font: 400 28px/1.2 'Geologica', 'Inter', sans-serif; margin: 0 0 8px; border: 0; padding: 0; }
.rs-content .wheel-cta p { color: #d9d6ef; margin: 0; }
.wheel-cta a { background: #ff5b3b; color: #fff; text-decoration: none; border-radius: 12px; padding: 14px 22px; font-weight: 600; white-space: nowrap; }
.wheel-cta a:hover { background: #ef4a2a; }
.rs-content .wheel-steps { counter-reset: st; }
.rs-content .wheel-steps li { counter-increment: st; }
.rs-content > ol.wheel-steps li::before { content: counter(st); }

@media (max-width: 900px) {
    .wheel-app { grid-template-columns: 1fr; }
    .wheel-stage { padding: 20px 12px; }
    .wheel-cta { grid-template-columns: 1fr; padding: 24px; }
    .wheel-cta a { text-align: center; }
}
