    .wheel-page {
        max-width: 920px;
        margin: 0 auto;
        padding: 0 1rem 2rem;
    }

    .wheel-layout {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 1.5rem;
        align-items: start;
    }

    /* Wheel Card */
    .wheel-card {
        background: var(--bg-card);
        border: 1px solid var(--card-border);
        border-radius: 1.5rem;
        padding: 1.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
        text-align: center;
    }

    .wheel-wrapper {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        aspect-ratio: 1;
        filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
    }

    :root.dark .wheel-wrapper {
        filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
    }

    .wheel-wrapper canvas {
        display: block;
        width: 100%;
        height: 100%;
        touch-action: none;
        cursor: grab;
    }
    .wheel-wrapper canvas.grabbing { cursor: grabbing; }

    /* Pointer wobble during spin */
    @keyframes pointerWobble {
        0%   { transform: translateX(-50%) rotate(0deg); }
        50%  { transform: translateX(-50%) rotate(-12deg); }
        100% { transform: translateX(-50%) rotate(0deg); }
    }
    .wheel-pointer.tick {
        animation: pointerWobble 0.12s ease-out;
    }
    @media (prefers-reduced-motion: reduce) {
        .wheel-pointer.tick { animation: none; }
    }

    /* Confetti */
    .confetti-container {
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 9999;
        overflow: hidden;
    }

    .confetti {
        position: absolute;
        top: -20px;
        width: 10px;
        height: 16px;
        border-radius: 2px;
        animation: confettiFall linear forwards;
    }

    @keyframes confettiFall {
        0% {
            transform: translate(0, 0) rotate(0);
            opacity: 1;
        }
        100% {
            transform: translate(var(--drift, 0px), 110vh) rotate(var(--rotate, 720deg));
            opacity: 0.7;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .confetti-container { display: none; }
    }


    .wheel-pointer {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-top: 26px solid var(--primary-accent);
        filter: drop-shadow(2px 2px 0 var(--border-color));
        z-index: 10;
        transform-origin: 50% 0;
    }

    .wheel-pointer::after {
        content: '';
        position: absolute;
        top: -38px;
        left: -8px;
        width: 16px;
        height: 16px;
        background: var(--primary-accent);
        border-radius: 50%;
        border: 1px solid var(--card-border);
    }

    .spin-btn {
        display: inline-block;
        margin-top: 1.25rem;
        background: var(--primary-accent);
        color: #202935;
        border: 1px solid var(--card-border);
        border-radius: 1rem;
        padding: 0.85rem 3rem;
        font-size: 1.3rem;
        font-weight: 800;
        cursor: pointer;
        transition: all 0.15s ease;
        font-family: inherit;
        letter-spacing: 0.02em;
    }

    .spin-btn:hover:not(:disabled) {
        filter: brightness(0.93);
    }

    .spin-btn:active:not(:disabled) {
        filter: brightness(0.88);
    }

    .spin-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    /* Wheel column wrapper — holds the card + the controls underneath so
       the controls live outside the card box. Also the fullscreen target,
       so the fullscreen button itself stays visible in fullscreen mode. */
    .wheel-column {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Wheel controls (sound + fullscreen) — sit outside the wheel card,
       matching the inline-button pattern used in breathing.php. No shadow
       so they read as secondary affordances next to the main spin button. */
    .wheel-controls {
        display: flex;
        justify-content: center;
        gap: 0.6rem;
        margin-top: 1rem;
    }
    .wheel-ctrl-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid var(--card-border);
        background: var(--bg-card);
        color: var(--text-primary);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
        padding: 0;
    }
    .wheel-ctrl-btn:hover { transform: translate(1px, 1px); }
    .wheel-ctrl-btn svg { width: 22px; height: 22px; }
    .wheel-ctrl-btn.muted {
        background: color-mix(in srgb, #ef4444 14%, var(--bg-card));
        color: #ef4444;
    }

    /* Fullscreen presentation: keep the wheel modest so the winner banner
       reads as the hero element — that's what the user came to see.
       Fullscreen targets the column wrapper so the controls (now outside
       the card) are still visible in fullscreen.

       NOTE on align-items: we use *stretch* on the column (default) so the
       inner wheel-card fills the full viewport width. If we use center
       instead, wheel-card shrinks to fit its content — and wheel-wrapper's
       `width: 100%` becomes a circular dependency that resolves wrong once
       the winner-banner appears, shrinking the wheel mid-session. */
    .wheel-column:fullscreen,
    .wheel-column:-webkit-full-screen {
        background: var(--bg-card);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        padding: 1rem;
        gap: 0.85rem;
        overflow: auto;
    }
    /* In fullscreen, the inner card loses its frame so the column reads as
       a single calm canvas — no nested box. The card itself is a flex
       column that centers its own children (wheel + spin + banner). */
    .wheel-column:fullscreen .wheel-card,
    .wheel-column:-webkit-full-screen .wheel-card {
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
    }
    .wheel-column:fullscreen .wheel-wrapper,
    .wheel-column:-webkit-full-screen .wheel-wrapper {
        max-width: min(55vh, 460px);
        width: 100%;
    }
    .wheel-column:fullscreen .spin-btn,
    .wheel-column:-webkit-full-screen .spin-btn {
        margin-top: 0.25rem;
        padding: 0.85rem 3rem;
        font-size: 1.2rem;
    }
    .wheel-column:fullscreen .winner-banner,
    .wheel-column:-webkit-full-screen .winner-banner {
        margin-top: 0.25rem;
        padding: 1.4rem 2.2rem;
        min-width: min(70vw, 480px);
        border-width: 4px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    .wheel-column:fullscreen .winner-label,
    .wheel-column:-webkit-full-screen .winner-label {
        font-size: 1rem;
        margin-bottom: 0.35rem;
    }
    .wheel-column:fullscreen .winner-text,
    .wheel-column:-webkit-full-screen .winner-text {
        font-size: 2.4rem;
        line-height: 1.15;
    }
    .wheel-column:fullscreen .winner-actions,
    .wheel-column:-webkit-full-screen .winner-actions {
        margin-top: 1rem;
    }
    .wheel-column:fullscreen .winner-action-btn,
    .wheel-column:-webkit-full-screen .winner-action-btn {
        font-size: 0.95rem;
        padding: 0.55rem 1.2rem;
    }
    /* Pin the controls to the bottom corners in fullscreen so they're out of
       the way of the wheel/winner area (sound left, fullscreen right). */
    .wheel-column:fullscreen .wheel-controls,
    .wheel-column:-webkit-full-screen .wheel-controls {
        position: absolute;
        bottom: 1.5rem;
        left: 1.5rem;
        right: 1.5rem;
        margin-top: 0;
        gap: 0;
        justify-content: space-between;
        pointer-events: none;
    }
    .wheel-column:fullscreen .wheel-controls .wheel-ctrl-btn,
    .wheel-column:-webkit-full-screen .wheel-controls .wheel-ctrl-btn {
        pointer-events: auto;
    }
    /* Brand footer — hidden by default, shown only in fullscreen, pinned to
       the bottom-center between the two corner controls. Sits in the recorded
       frame without touching the wheel itself. */
    .wheel-fs-footer {
        display: none;
    }
    .wheel-column:fullscreen .wheel-fs-footer,
    .wheel-column:-webkit-full-screen .wheel-fs-footer {
        display: inline-flex;
        align-items: center;
        gap: 0.4em;
        position: absolute;
        bottom: 1.6rem;
        left: 50%;
        transform: translateX(-50%);
        font-size: clamp(0.75rem, 1.7vh, 1rem);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-secondary);
        opacity: 0.75;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        pointer-events: none;
        user-select: none;
        direction: ltr;
        white-space: nowrap;
    }
    .wheel-fs-footer svg {
        width: 1.5em;
        height: 1.5em;
        flex-shrink: 0;
    }
    @media (max-width: 600px) {
        .wheel-column:fullscreen .wheel-wrapper,
        .wheel-column:-webkit-full-screen .wheel-wrapper {
            max-width: min(50vh, 320px);
        }
        .wheel-column:fullscreen .winner-text,
        .wheel-column:-webkit-full-screen .winner-text {
            font-size: 1.8rem;
        }
    }

    /* Winner Banner */
    .winner-banner {
        display: none;
        margin-top: 1rem;
        background: var(--primary-accent);
        border: 1px solid var(--card-border);
        border-radius: 1rem;
        padding: 1rem 1.25rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
        text-align: center;
        animation: popIn 0.35s ease;
    }

    .winner-banner.show { display: block; }

    .winner-label {
        font-size: 0.85rem;
        font-weight: 700;
        color: #202935;
        opacity: 0.7;
        margin-bottom: 0.2rem;
    }

    .winner-text {
        font-size: 1.5rem;
        font-weight: 900;
        color: #202935;
    }

    .winner-actions {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        margin-top: 0.75rem;
        flex-wrap: wrap;
    }

    .winner-action-btn {
        padding: 0.45rem 0.9rem;
        border: 1px solid var(--card-border);
        border-radius: 0.6rem;
        background: rgba(255, 255, 255, 0.55);
        color: #202935;
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
        font-family: inherit;
        transition: all 0.15s;
    }

    .winner-action-btn:hover {
        background: #202935;
        color: var(--primary-accent);
        transform: translateY(-1px);
    }

    @keyframes popIn {
        0% { transform: scale(0.8); opacity: 0; }
        100% { transform: scale(1); opacity: 1; }
    }

    /* Items Card */
    .items-card {
        background: var(--bg-card);
        border: 1px solid var(--card-border);
        border-radius: 1.5rem;
        padding: 1.25rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
        /* No overflow:hidden — the saved-list dropdown is absolute-positioned
           inside this card and needs to extend below it. */
    }

    .items-card h3 {
        font-size: 1rem;
        font-weight: 800;
        color: var(--text-primary);
        margin: 0 0 0.75rem;
    }

    /* Saved lists selector */
    .list-bar {
        position: relative;
        margin-bottom: 0.75rem;
    }
    .list-bar-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.55rem 0.75rem;
        border: 1px solid var(--card-border);
        border-radius: 0.75rem;
        background: var(--bg-input);
        color: var(--text-primary);
        font-family: inherit;
        font-size: 0.9rem;
        font-weight: 700;
        cursor: pointer;
        text-align: start;
        transition: box-shadow 0.15s, transform 0.15s;
    }
    .list-bar-btn:hover {
        filter: brightness(0.93);
    }
    .list-bar-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
    .list-bar-name {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .list-bar-chevron {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        opacity: 0.7;
        transition: transform 0.15s;
    }
    .list-bar.open .list-bar-chevron { transform: rotate(180deg); }

    .list-menu {
        position: absolute;
        z-index: 50;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        background: var(--bg-card);
        border: 1px solid var(--card-border);
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
        padding: 0.4rem;
        max-height: 320px;
        overflow-y: auto;
    }
    .list-menu[hidden] { display: none; }
    .list-menu-rows { display: flex; flex-direction: column; gap: 0.2rem; }
    .list-menu-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.35rem 0.45rem;
        border-radius: 0.5rem;
        cursor: pointer;
        transition: background 0.1s;
    }
    .list-menu-row:hover { background: color-mix(in srgb, var(--primary-accent) 18%, transparent); }
    .list-menu-row.active { background: color-mix(in srgb, var(--primary-accent) 28%, transparent); }
    .list-menu-row-name {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-primary);
    }
    .list-menu-row-name-input {
        flex: 1;
        min-width: 0;
        padding: 0.2rem 0.4rem;
        border: 1.5px solid var(--primary-accent);
        border-radius: 0.4rem;
        background: var(--bg-input);
        color: var(--text-primary);
        font-family: inherit;
        font-size: 0.88rem;
        font-weight: 600;
    }
    .list-menu-row-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        padding: 0;
        border: none;
        border-radius: 0.4rem;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
    }
    .list-menu-row-action:hover { background: color-mix(in srgb, var(--border-color) 18%, transparent); color: var(--text-primary); }
    .list-menu-row-action.danger:hover { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
    .list-menu-row-action svg { width: 14px; height: 14px; }
    .list-menu-row-action[disabled] { opacity: 0.35; cursor: not-allowed; }

    .list-menu-new {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        width: 100%;
        margin-top: 0.35rem;
        padding: 0.45rem 0.55rem;
        border: 1.5px dashed var(--border-color);
        border-radius: 0.5rem;
        background: transparent;
        color: var(--text-primary);
        font-family: inherit;
        font-size: 0.85rem;
        font-weight: 700;
        cursor: pointer;
        transition: background 0.1s, border-color 0.1s;
    }
    .list-menu-new:hover {
        background: color-mix(in srgb, var(--primary-accent) 15%, transparent);
        border-color: var(--primary-accent);
    }
    .list-menu-new-plus {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        font-size: 1rem;
        font-weight: 900;
        line-height: 1;
    }

    .item-input-group {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        max-width: 100%;
    }

    .item-input {
        flex: 1;
        min-width: 0;
        padding: 0.6rem 0.85rem;
        border: 1px solid var(--card-border);
        border-radius: 0.75rem;
        background: var(--bg-input);
        color: var(--text-primary);
        font-family: inherit;
        font-size: 0.9rem;
    }

    .item-input:focus {
        outline: none;
        border-color: var(--primary-accent);
        box-shadow: 0 0 0 3px rgba(254, 192, 7, 0.15);
    }

    .add-btn {
        padding: 0.6rem 0.75rem;
        border: 1px solid var(--card-border);
        border-radius: 0.75rem;
        background: var(--primary-accent);
        color: #202935;
        font-weight: 700;
        font-size: 0.9rem;
        cursor: pointer;
        font-family: inherit;
        transition: all 0.15s;
        white-space: nowrap;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .add-btn-icon { display: none; font-size: 1.4rem; line-height: 1; font-weight: 800; }

    .add-btn:hover {
        filter: brightness(0.93);
    }

    /* Preset Chips */
    .preset-section {
        margin-bottom: 0.75rem;
    }

    .preset-label {
        font-size: 0.78rem;
        font-weight: 700;
        color: var(--text-muted);
        margin-bottom: 0.4rem;
    }

    .preset-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .preset-chip {
        padding: 0.3rem 0.65rem;
        border: 1px solid var(--card-border);
        border-radius: 2rem;
        background: var(--bg-input);
        color: var(--text-primary);
        font-size: 0.75rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s;
        font-family: inherit;
    }

    .preset-chip:hover {
        background: var(--primary-accent);
        color: #202935;
    }

    /* Items List */
    .items-list {
        max-height: 260px;
        overflow-y: auto;
        margin-bottom: 0.75rem;
        scrollbar-width: thin;
    }

    .item-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.45rem 0.5rem;
        border-bottom: 1px solid color-mix(in srgb, var(--border-color) 20%, transparent);
        transition: background 0.1s;
    }

    .item-row:hover {
        background: color-mix(in srgb, var(--primary-accent) 8%, transparent);
    }

    .item-color-dot {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        flex-shrink: 0;
        border: 1px solid var(--card-border);
        padding: 0;
        cursor: pointer;
        transition: transform .12s ease;
        position: relative;
    }
    .item-color-dot:hover { transform: scale(1.15); }

    /* Per-item weight indicator — always visible (subtle when 1, accented when > 1).
       Clicking opens the weight popup. Sits between name and action buttons so
       it reads as a separate concept from color. */
    .item-weight {
        flex-shrink: 0;
        min-width: 30px;
        padding: 2px 6px;
        font-size: 0.78rem;
        font-weight: 700;
        color: var(--text-muted);
        background: transparent;
        border: 1.5px solid transparent;
        border-radius: 6px;
        cursor: pointer;
        text-align: center;
        user-select: none;
        font-family: inherit;
        transition: background 0.12s, border-color 0.12s, color 0.12s;
        line-height: 1.3;
        /* Force LTR so "×" renders before the digit even in RTL contexts. */
        direction: ltr;
    }
    .item-weight:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
    .item-weight:hover {
        background: color-mix(in srgb, var(--primary-accent) 18%, transparent);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    .item-weight.boosted {
        color: #202935;
        background: var(--primary-accent);
        border-color: var(--border-color);
        font-weight: 800;
    }

    /* Standalone weight popup (mirrors color popup positioning) */
    .weight-popup {
        position: absolute;
        z-index: 1000;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.25);
        display: none;
        min-width: 180px;
    }
    .weight-popup.show { display: block; }
    .weight-popup-label {
        font-size: 0.78rem;
        font-weight: 700;
        color: var(--text-secondary);
        margin-bottom: 8px;
        text-align: center;
    }
    .weight-popup-stepper {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-bottom: 8px;
    }
    .weight-btn {
        width: 30px;
        height: 30px;
        border-radius: 6px;
        border: 1px solid var(--card-border);
        background: var(--bg-input);
        color: var(--text-primary);
        cursor: pointer;
        font-weight: 800;
        font-size: 1.1rem;
        line-height: 1;
        font-family: inherit;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .weight-btn:hover:not(:disabled) {
        background: var(--primary-accent);
        color: #202935;
    }
    .weight-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .weight-value {
        min-width: 32px;
        text-align: center;
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--text-primary);
    }
    .weight-popup-reset {
        width: 100%;
        padding: 5px 8px;
        font-size: 0.72rem;
        background: var(--bg-input);
        color: var(--text-secondary);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        cursor: pointer;
        font-family: inherit;
    }
    .weight-popup-reset:hover { color: var(--text-primary); }
    .weight-popup-hint {
        font-size: 0.68rem;
        color: var(--text-muted);
        text-align: center;
        margin-top: 6px;
        line-height: 1.4;
    }

    /* Color palette popup (per-item) */
    .color-popup {
        position: absolute;
        z-index: 1000;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.25);
        display: none;
    }
    .color-popup.show { display: block; }
    .color-popup-grid {
        display: grid;
        grid-template-columns: repeat(8, 22px);
        gap: 4px;
    }
    .color-popup-swatch {
        width: 22px; height: 22px;
        border-radius: 50%;
        cursor: pointer;
        border: 2px solid transparent;
        transition: transform .1s ease;
    }
    .color-popup-swatch:hover { transform: scale(1.15); }
    .color-popup-swatch.selected { border-color: var(--text-primary); }
    .color-popup-reset {
        margin-top: 6px;
        padding: 4px 8px;
        width: 100%;
        font-size: 0.72rem;
        background: var(--bg-input);
        color: var(--text-secondary);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        cursor: pointer;
    }
    .color-popup-reset:hover { color: var(--text-primary); }

    /* Confirm modal */
    .confirm-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        padding: 1rem;
    }
    .confirm-overlay.show { display: flex; }
    .confirm-dialog {
        background: var(--bg-card);
        border: 1px solid var(--card-border);
        border-radius: 1rem;
        padding: 1.25rem 1.25rem 1rem;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
        max-width: 380px;
        width: 100%;
        animation: popIn 0.2s ease;
    }
    .confirm-message {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    .confirm-actions {
        display: flex;
        gap: 0.5rem;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    .confirm-btn {
        padding: 0.5rem 1rem;
        border: 1px solid var(--card-border);
        border-radius: 0.6rem;
        font-size: 0.85rem;
        font-weight: 700;
        cursor: pointer;
        font-family: inherit;
        transition: all 0.15s;
    }
    .confirm-btn-cancel {
        background: var(--bg-input);
        color: var(--text-primary);
    }
    .confirm-btn-ok {
        background: var(--primary-accent);
        color: #202935;
    }
    .confirm-btn:hover { filter: brightness(0.93); }

    .item-name {
        flex: 1;
        min-width: 0;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-primary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .item-actions {
        display: flex;
        gap: 0.15rem;
        flex-shrink: 0;
        align-items: center;
    }

    .item-action-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        padding: 0.3rem;
        border-radius: 0.4rem;
        transition: background 0.15s, color 0.15s;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    .item-action-btn svg {
        width: 15px;
        height: 15px;
    }

    .item-action-btn:hover:not(:disabled) {
        background: color-mix(in srgb, var(--primary-accent) 20%, transparent);
        color: var(--text-primary);
    }

    .item-action-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    .item-remove-btn:hover:not(:disabled) {
        background: color-mix(in srgb, #ef4444 20%, transparent) !important;
        color: #ef4444 !important;
    }

    .item-edit-btn:hover:not(:disabled) {
        color: var(--primary-accent) !important;
    }

    .items-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .item-count {
        font-size: 0.78rem;
        color: var(--text-muted);
        font-weight: 600;
    }

    .clear-all-btn {
        padding: 0.3rem 0.6rem;
        border: 1px solid var(--card-border);
        border-radius: 0.5rem;
        background: transparent;
        color: var(--text-secondary);
        font-size: 0.75rem;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
        transition: all 0.15s;
    }

    .clear-all-btn:hover {
        background: #ef4444;
        color: #fff;
        border-color: #ef4444;
    }

    /* Drag styles */
    .item-drag-handle {
        cursor: grab;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.1rem;
        flex-shrink: 0;
        touch-action: none;
    }

    .item-drag-handle:active { cursor: grabbing; }
    .item-drag-handle svg { width: 14px; height: 14px; }

    .item-row.dragging {
        opacity: 0.4;
    }

    .item-row.drag-over {
        border-top: 2px solid var(--primary-accent);
    }

    .item-row.is-hidden .item-name {
        text-decoration: line-through;
        opacity: 0.5;
    }

    .item-row.is-hidden .item-color-dot {
        opacity: 0.45;
    }

    /* Editable item */
    .item-name[contenteditable="true"] {
        outline: none;
        background: var(--bg-input);
        border-radius: 0.3rem;
        padding: 0.1rem 0.3rem;
        border: 1px solid var(--primary-accent);
    }

    /* While a row is in edit mode, hide weight + action icons so the name
       field gets the full available row width and isn't truncated. */
    .item-row.editing .item-weight,
    .item-row.editing .item-actions {
        display: none;
    }

    /* Batch add hint */
    .batch-hint {
        font-size: 0.7rem;
        color: var(--text-muted);
        margin-top: -0.5rem;
        margin-bottom: 0.5rem;
    }

    /* First-time hint shown above the input until the user customizes the
       defaults. Hidden via .hidden once `userCustomized` flips. */
    .examples-hint {
        font-size: 0.78rem;
        line-height: 1.55;
        color: var(--text-secondary);
        background: var(--bg-input);
        border: 1px dashed var(--border-color);
        border-radius: 0.5rem;
        padding: 0.55rem 0.75rem;
        margin: 0 0 0.85rem;
    }
    .examples-hint.hidden { display: none; }

    .edit-hint {
        display: none;
        font-size: 0.72rem;
        color: var(--text-muted);
        text-align: center;
        margin-bottom: 0.6rem;
        font-style: italic;
    }

    .edit-hint.hidden { display: none; }

    /* Hide up/down move buttons on desktop — drag & drop handles reordering. */
    .item-action-btn.item-move-btn { display: none; }

    /* Edit icon visible on desktop too — double-click still works as a shortcut. */
    .item-name { cursor: text; }
    .item-name[contenteditable="true"] { cursor: text; }

    /* Reduced motion */
    @media (prefers-reduced-motion: reduce) {
        .winner-banner { animation: none; }
    }

    /* ================= Responsive ================= */
    @media (max-width: 768px) {
        .wheel-page {
            padding: 0 0.75rem 2rem;
        }

        .wheel-layout {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .wheel-wrapper {
            max-width: 340px;
        }

        .wheel-card,
        .items-card {
            padding: 1rem;
            border-radius: 1.2rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
        }

        .items-card h3 {
            font-size: 0.95rem;
            margin-bottom: 0.6rem;
        }

        /* Mobile: bigger drag handle for touch reorder, hide button-based move */
        .item-drag-handle {
            width: 32px;
            height: 36px;
            padding: 0.3rem;
        }
        .item-drag-handle svg { width: 18px; height: 18px; }
        .edit-hint:not(.hidden) { display: block; }
        .item-action-btn.item-edit-btn { display: inline-flex; }
        .item-name { cursor: default; }

        .items-list { max-height: 320px; }

        .item-row {
            padding: 0.55rem 0.3rem;
            gap: 0.4rem;
        }

        .item-name { font-size: 0.9rem; }

        .item-action-btn {
            width: 40px;
            height: 40px;
            padding: 0.35rem;
        }
        .item-action-btn svg { width: 18px; height: 18px; }

        .item-actions { gap: 0.1rem; }

        .winner-actions {
            flex-direction: column;
            gap: 0.45rem;
        }
        .winner-action-btn {
            width: 100%;
            padding: 0.65rem 0.9rem;
            font-size: 0.9rem;
        }

        .edit-hint {
            font-size: 0.75rem;
            padding: 0 0.25rem;
            line-height: 1.4;
        }

        .preset-chip {
            padding: 0.4rem 0.75rem;
            font-size: 0.8rem;
        }

        .item-input {
            padding: 0.65rem 0.85rem;
            font-size: 1rem;
        }
        .add-btn {
            padding: 0.65rem 0.9rem;
            min-width: 48px;
        }
        .add-btn-text { display: none; }
        .add-btn-icon { display: inline; }

        .spin-btn {
            width: 100%;
            max-width: 320px;
            padding: 0.85rem 2rem;
            font-size: 1.2rem;
        }
    }

    @media (max-width: 480px) {
        .wheel-wrapper {
            max-width: 280px;
        }

        .wheel-card,
        .items-card {
            padding: 0.85rem;
        }

        .spin-btn {
            padding: 0.75rem 1.5rem;
            font-size: 1.1rem;
        }

        .item-action-btn {
            width: 36px;
            height: 36px;
            padding: 0.25rem;
        }
        .item-action-btn svg { width: 16px; height: 16px; }
        .item-actions { gap: 0; }
        .item-row { padding: 0.5rem 0.25rem; gap: 0.3rem; }

        /* Hide move buttons on small mobile — drag handle handles reorder */
        .item-action-btn.item-move-btn { display: none; }

        .winner-text { font-size: 1.3rem; }
    }

    /* Touch-specific: remove sticky hover feedback */
    @media (hover: none) {
        .item-action-btn:hover:not(:disabled) {
            background: none;
            color: var(--text-muted);
        }
        .item-row:hover { background: none; }
        .preset-chip:hover {
            background: var(--bg-input);
            color: var(--text-primary);
            transform: none;
            box-shadow: none;
        }
        .add-btn:hover { box-shadow: none; transform: none; }
        .winner-action-btn:hover {
            background: rgba(255, 255, 255, 0.55);
            color: #202935;
            transform: none;
        }
        .clear-all-btn:hover {
            background: transparent;
            color: var(--text-secondary);
            border-color: var(--border-color);
        }
    }
