#mbs-decision-wheel {
    max-width: 1100px;
    margin: 14px auto;
    padding: 10px;
    }


.dw-app {
    background: #ffffff;
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.dw-header {
    margin-bottom: 28px;
}

.dw-header h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 4vw, 48px);
    line-height: 1;
}

.dw-header p {
    margin: 0;
    color: #6f6f7b;
    font-size: 16px;
}

.dw-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 18px;
    align-items: start;
}

.dw-tasks,
.dw-wheel {
    background: #f7f7fb;
    border-radius: 24px;
    padding: 18px;
}

.dw-tasks h2 {
    margin: 0 0 18px;
    font-size: 16px;
}

.dw-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 12px;
    height: 40px;
    }

.dw-input-row {
    display: flex;
    gap: 12px;
}

.dw-input-row input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #ddddE8;
    border-radius: 14px;
    font-size: 16px;
    outline: none;
}

.dw-input-row input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.dw-input-row button {
    border: 0;
    border-radius: 14px;
    background: #8b5cf6;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.dw-input-row button {
    padding: 0 18px;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

#wheelCanvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.ast-container, .ast-container-fluid
{
    margin-left: auto;
    margin-right: auto;
    padding-left: 8px;
    padding-right: 8px;
}

@media (max-width: 768px) {
    #mbs-decision-wheel {
        width: 100%;
        margin: 14px auto;
        padding: 12px;
    }

    .dw-app {
        padding: 16px;
    }

    .dw-layout {
        grid-template-columns: 1fr;
    }
}
#task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.dw-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    padding: 10px 12px;

    background: #ffffff;
    border-radius: 14px;
}

.dw-task-item span {
    flex: 1;
    min-width: 0;

    text-align: left;
    line-height: 1.4;

    overflow-wrap: anywhere;
}

.dw-remove-task {
    flex: 0 0 auto;

    width: 30px;
    height: 30px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    font-weight: 600;

    cursor: pointer;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.dw-remove-task:hover {
    transform: scale(1.08);
}

.dw-remove-task:active {
    transform: scale(0.94);
}
#reset-button {
    width: 100%;
    margin-top: 10px;
    padding: 14px;

    border: 1px solid #dddde8;
    border-radius: 16px;

    background: #ffffff;
    color: #555566;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

#reset-button:hover {
    background: #f0f0f6;
    transform: translateY(-1px);
}

#reset-button:active {
    transform: scale(0.98);
}
.dw-result {
    position: relative;
    overflow: hidden;

    min-height: 120px;
    margin-top: 14px;
    padding: 24px 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border-radius: 16px;

    text-align: center;
}

.dw-result-content {
    position: relative;
    z-index: 2;
}

.dw-result-label {
    display: block;
    margin-bottom: 6px;

    color: #777786;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dw-result strong {
    display: block;

    color: #22222c;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.2;

    overflow-wrap: anywhere;
}
.dw-wheel {
    position: relative;
}

.dw-result {
    position: relative;
    overflow: hidden;

    min-height: 150px;
    margin-top: 14px;
    padding: 28px 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border-radius: 16px;
    text-align: center;
}

.dw-result[hidden] {
    display: none;
}

.dw-result-content {
    position: relative;
    z-index: 2;
}

.dw-result-label {
    display: block;
    margin-bottom: 6px;

    color: #777786;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dw-result strong {
    display: block;

    color: #22222c;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.2;

    overflow-wrap: anywhere;
}

.heart-burst {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

.heart-particle {
    position: absolute;
    left: 50%;
    top: 50%;

    font-size: var(--heart-size);
    line-height: 1;

    opacity: 0;

    transform:
        translate(-50%, -50%)
        scale(0.3);

    animation-name: heart-burst-animation;
    animation-duration: var(--duration);
    animation-delay: var(--delay);
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes heart-burst-animation {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(0.3)
            rotate(0deg);
    }

    15% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--move-x)),
                calc(-50% + var(--move-y))
            )
            scale(1.2)
            rotate(180deg);
    }
}

#wheel {
    position: relative;
    z-index: 1;
}

.dw-wheel-stage {
    position: relative;

    width: min(100%, 420px);
    aspect-ratio: 1 / 1;

    margin: 0 auto 14px;
}

.dw-wheel-stage #wheel {
    width: 100%;
    height: 100%;
    margin: 0;

    display: block;
}
.dw-wheel {
    position: relative;
    padding: 18px;
    text-align: center;

    background: #f7f7fb;
    border-radius: 24px;
}

.dw-wheel-stage {
    position: relative;

    width: min(100%, 420px);
    aspect-ratio: 1 / 1;

    margin: 0 auto 14px;
}

/* Само вращающееся колесо */
#wheel {
    position: relative;
    z-index: 1;

    display: block;

    width: 100%;
    height: 100%;
    margin: 0;

    background: #ffffff;
    border-radius: 50%;

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.08),
        inset 0 0 0 8px #ffffff;

    transition:
        transform 4s cubic-bezier(0.17, 0.67, 0.18, 1);
}

/* Указатель */
.dw-wheel-stage::before {
    content: "";

    position: absolute;
    top: -8px;
    left: 50%;
    z-index: 10;

    width: 0;
    height: 0;

    transform: translateX(-50%);

    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 32px solid #8b5cf6;

    filter:
        drop-shadow(0 5px 10px rgba(0, 0, 0, 0.18));

    pointer-events: none;
}

/* Кнопка внутри колеса */
#spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 20;

    width: 92px;
    height: 92px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translate(-50%, -50%);

    border: 6px solid #8b5cf6;
    border-radius: 50%;

    background: #ffffff;
    color: #8b5cf6;

    font-size: 18px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.16);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

#spin-button:hover {
    transform:
        translate(-50%, -50%)
        scale(1.04);

    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.2);
}

#spin-button:active {
    transform:
        translate(-50%, -50%)
        scale(0.94);
}

#spin-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* RESET остаётся под колесом */
#reset-button {
    width: 100%;
    margin-top: 0;
    padding: 14px;

    border: 1px solid #dddde8;
    border-radius: 16px;

    background: #ffffff;
    color: #555566;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

#reset-button:hover {
    background: #f0f0f6;
    transform: translateY(-1px);
}

#reset-button:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .dw-wheel {
        padding: 12px;
    }

    #spin-button {
        width: 76px;
        height: 76px;

        border-width: 5px;

        font-size: 15px;
    }

    .dw-wheel-stage::before {
        top: -6px;

        border-left-width: 15px;
        border-right-width: 15px;
        border-top-width: 27px;
    }
}
