.wheel { padding-block: var(--spacing) 3rem; }
.wheel h1 { max-width: none; }

.wheel-layout:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    max-width: 60rem;
    margin-block: 1.5rem;
}

@media (min-width: 50rem) {
    .wheel-layout:not([hidden]) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.wheel-display { min-width: 0; text-align: center; }

.wheel-drawing {
    position: relative;
    max-width: 27rem;
    margin: 0.55rem auto 1rem;
}

.wheel-drawing canvas {
    display: block;
    width: 100%;
    height: auto;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50%;
}

.wheel-drawing::after {
    position: absolute;
    inset: -0.3rem auto auto 50%;
    transform: translateX(-50%);
    border: 0.85rem solid transparent;
    border-top: 1.25rem solid var(--text);
    content: "";
}

.wheel-editor {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.wheel-editor legend { padding-inline: 0.3rem; font-weight: 700; }
.wheel-editor p { margin-top: 0; }
.wheel-editor ol { list-style: none; padding: 0; margin: 0 0 1rem; }

.wheel-editor li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.5rem;
    align-items: end;
    margin-block: 0.6rem;
}

.wheel-editor li label { grid-column: 1 / -1; font-weight: 650; }
.wheel-editor input:not([type]), .wheel button {
    min-height: 44px;
    border: 1px solid var(--muted);
    border-radius: 0.4rem;
    background: var(--surface);
    color: var(--text);
    padding: 0.45rem 0.65rem;
    font: inherit;
}

.wheel-editor input:not([type]) { width: 100%; min-width: 0; }
.wheel-editor input[aria-invalid="true"] { border-color: var(--error); }
.wheel button { min-width: 44px; cursor: pointer; }
.wheel button[data-spin] { color: var(--surface); background: var(--primary); }
.wheel button:disabled { opacity: 0.68; cursor: default; }
.wheel-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wheel-display .wheel-actions { justify-content: center; }
.wheel output { display: block; min-height: 1.6em; margin-top: 0.6rem; font-weight: 700; }
.wheel-error { color: var(--error); margin-inline: auto; }
.wheel-error:empty { margin: 0; }

.wheel-option {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-height: 44px;
    width: fit-content;
    margin-top: 0.5rem;
}

.wheel-option input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--primary); flex-shrink: 0; }
.wheel-guide { margin-top: 2rem; max-width: 65ch; }
