.page-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.wheel-shell {
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(0, 1.35fr);
    gap: 18px;
    align-items: start;
}

.wheel-stage {
    position: sticky;
    top: 18px;
    overflow: hidden;
}

.wheel-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 24% 18%, rgba(235, 176, 80, .16), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(47, 125, 109, .12), transparent 34%);
}

.wheel-stage > * {
    position: relative;
    z-index: 1;
}

.wheel-mode-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

#wheel-selector {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .92);
    color: var(--text);
    font-weight: 750;
}

.wheel-canvas-wrap {
    position: relative;
    width: min(100%, 390px);
    margin: 8px auto 14px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 18px 28px rgba(35, 60, 45, .16));
}

.wheel-pointer {
    position: absolute;
    top: 1px;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 0;
    border-bottom: 28px solid #17211b;
    filter: drop-shadow(0 4px 8px rgba(23, 33, 27, .2));
}

.wheel-actions,
.wheel-result-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.wheel-result {
    min-height: 96px;
    margin: 8px 0 14px;
}

.wheel-result-empty,
.wheel-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.wheel-result-empty {
    text-align: center;
    padding: 26px 12px;
    border: 1px dashed #d3ded7;
    border-radius: 14px;
    background: rgba(255, 255, 255, .68);
}

.wheel-result-card {
    padding: 14px;
    border: 1px solid #dbe7df;
    border-radius: 16px;
    background: rgba(255,255,255,.86);
    text-align: center;
    box-shadow: 0 12px 30px rgba(35,60,45,.08);
}

.wheel-result-kicker {
    color: var(--warning);
    font-size: 12px;
    font-weight: 850;
}

.wheel-result-title {
    margin: 4px 0;
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 900;
    color: var(--text);
    overflow-wrap: anywhere;
}

.wheel-result-note {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.wheel-panel {
    min-width: 0;
}

.wheel-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
}

.wheel-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.wheel-panel-head .card-title {
    margin-bottom: 2px;
}

.wheel-head-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.wheel-head-actions .btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.wheel-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px auto;
    gap: 8px;
    margin-bottom: 10px;
}

.wheel-inline-form.wide {
    grid-template-columns: minmax(0, 1fr) auto;
}

.wheel-inline-form.library-form {
    grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) 74px auto;
}

.wheel-inline-form.tags-form {
    grid-template-columns: minmax(130px, 1fr) 74px 58px auto;
}

.wheel-inline-form input,
.wheel-inline-form select {
    min-width: 0;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
}

.wheel-list {
    display: grid;
    gap: 8px;
    max-height: 560px;
    overflow: auto;
    padding-right: 4px;
}

.wheel-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px;
    border: 1px solid #e1e9e3;
    border-radius: 14px;
    background: #fff;
}

.wheel-row.library {
    align-items: flex-start;
}

.wheel-check-row {
    cursor: pointer;
}

.wheel-check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.wheel-row-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 3px;
}

.wheel-row-main strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.wheel-row-main small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.wheel-color-dot {
    width: 13px;
    height: 13px;
    border-radius: 99px;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.wheel-mini-btn {
    border: 1px solid #dce7df;
    background: #f8faf8;
    color: var(--muted);
    border-radius: 999px;
    min-height: 28px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.wheel-mini-btn:hover {
    color: var(--text);
    background: #fff;
}

.wheel-mini-btn.danger {
    color: var(--danger);
    border-color: #efd2cc;
    background: #fff8f6;
}

.wheel-chip-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.wheel-chip {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--chip-color, #216e4e) 13%, white);
    color: var(--chip-color, #216e4e);
    font-size: 11px;
    font-weight: 850;
    border: 1px solid color-mix(in srgb, var(--chip-color, #216e4e) 22%, white);
}

.wheel-chip.muted {
    --chip-color: #87948d;
}

.btn:disabled,
.btn[disabled] {
    opacity: .58;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 980px) {
    .wheel-shell {
        grid-template-columns: 1fr;
    }

    .wheel-stage {
        position: static;
    }
}

@media (max-width: 640px) {
    .wheel-inline-form,
    .wheel-inline-form.wide,
    .wheel-inline-form.library-form,
    .wheel-inline-form.tags-form {
        grid-template-columns: 1fr;
    }

    .wheel-panel-head {
        display: grid;
        align-items: stretch;
    }

    .wheel-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .wheel-row-main {
        flex-basis: calc(100% - 28px);
    }

    .wheel-mini-btn {
        margin-top: 2px;
    }
}
