﻿:root {
    --w-col: #4f46e5;
    --p-col: #059669;
    --d-col: #f59e0b;
    --chip-bg: #1f2937;
    --chip-fg: #e5e7eb;
    --card-bg: #fff;
    --soft: #eef2f7;
    --wheel-row: 44px; /* fixed row height */
    --wheel-gap: 10px; /* vertical gap between rows */
}

.omv-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 64px;
}

.omv-hero .omv-title {
    font-size: 44px;
    line-height: 1.1;
    margin: 16px 0 6px;
}

.omv-sub {
    margin: 0 0 18px;
    color: #374151;
}

.omv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.omv-card {
    background: var(--card-bg);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px 16px 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,.03);
}

.readout {
    font-weight: 800;
    margin-top: 10px;
}

.wheel-root[data-role="W"] {
    --role-col: var(--w-col);
}

.wheel-root[data-role="P"] {
    --role-col: var(--p-col);
}

.wheel-root[data-role="D"] {
    --role-col: var(--d-col);
}

.wheels {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
}

.wheel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 10px 2px;
    line-height: 1;
}

.role-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--role-col);
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--role-col) 25%,transparent);
}

.role-title {
    font-weight: 800;
    color: var(--role-col);
}

.wheel-frame {
    background: #fff;
    border: 2px solid color-mix(in srgb,var(--role-col) 40%,transparent);
    border-radius: 12px;
    padding: 8px;
}
/* Show EXACTLY 3 rows: height = 3*row + 2*gap  */
.wheel-viewport {
    height: calc(var(--wheel-row) * 3 + var(--wheel-gap) * 2);
    overflow: auto;
    scrollbar-gutter: stable both-edges;
    border-radius: 10px;
    background: #fff;
    outline: none;
}

    .wheel-viewport:focus {
        box-shadow: 0 0 0 2px color-mix(in srgb,var(--role-col) 35%,transparent);
    }

/* No per-item margins. We use row-gap so the scroll step is constant */
.wheel-list {
    list-style: none;
    margin: 0;
    padding:
    /* top/bottom paddings allow first/last to center */
    calc(var(--wheel-row) + var(--wheel-gap)) 0;
    display: grid;
    grid-auto-rows: var(--wheel-row);
    row-gap: var(--wheel-gap);
}

.wheel-item {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .08s ease, background .08s ease, border-color .08s ease;
    border: 1px solid transparent;
    text-align: center;
    font-weight: 600;
}

    .wheel-item:hover {
        transform: scale(1.02);
        background: color-mix(in srgb,var(--role-col) 12%,transparent);
    }

    .wheel-item.sel {
        background: color-mix(in srgb,var(--role-col) 22%,transparent);
        border: 1px solid color-mix(in srgb,var(--role-col) 60%,transparent);
        font-weight: 800;
        color: #111827;
    }

.metrics {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

    .metrics.cols-3 {
        grid-template-columns: repeat(3,1fr);
    }

    .metrics .metric {
        background: var(--soft);
        border-radius: 12px;
        padding: 10px 12px;
    }

        .metrics .metric b {
            display: block;
            font-size: .92rem;
            color: #111827;
            opacity: .9;
            margin-bottom: 4px;
        }

.omv-actions {
    display: flex;
    gap: 10px;
    margin: 18px 0;
}

.btn {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    background: #fff;
    cursor: pointer;
}

    .btn.primary {
        background: #CEEB46;
        border-color: #CEEB46;
        font-weight: 800;
    }

#diffMetrics .metric span {
    font-weight: 800;
}

.alert {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
}

    .alert.ok {
        background: #ecfdf5;
        color: #065f46;
    }

    .alert.warn {
        background: #fffbeb;
        color: #92400e;
    }

    .alert.err {
        background: #fef2f2;
        color: #991b1b;
    }

.hint {
    color: #4b5563;
}

.sticky-summary {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    background: rgba(20,22,25,.9);
    color: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    width: fit-content;
    margin-left: auto;
    margin-right: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    display: none;
    gap: 14px;
    align-items: center;
    backdrop-filter: blur(6px);
}

    .sticky-summary.show {
        display: flex;
    }

.sticky-chip {
    background: var(--chip-bg);
    color: var(--chip-fg);
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 600;
    font-size: .9rem;
}

.sticky-diff.ok {
    color: #86efac;
}

.sticky-diff.warn {
    color: #fde047;
}

.sticky-diff.err {
    color: #fca5a5;
}


/* Base: hidden, shown via .show on small screens */
#stickySummary {
    display: none;
    z-index: 2147483000; /* on top of dev overlays/modals */
}

    /* Mobile/Tablet: show when JS toggles .show */
    #stickySummary.show {
        display: flex;
    }

/* Desktop: always visible, top-center, no transform clashes */
@media (min-width: 1024px) {
    #stickySummary {
        display: flex; /* always on */
        position: fixed;
        top: 16px;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translateX(-50%); /* center horizontally */
        max-width: min(92vw, 1100px);
        pointer-events: auto;
    }
}
