.inventory-mix-device-root {
    position: fixed;
    inset: 0;
    z-index: 2200;
}

.inventory-mix-device {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    box-sizing: border-box;
    background: rgba(2, 9, 12, 0.72);
    backdrop-filter: blur(10px);
    color: #eefbf4;
}

.inventory-mix-device-window {
    width: min(1080px, 100%);
    max-height: min(760px, calc(100vh - 56px));
    overflow: hidden;
    border: 1px solid rgba(141, 240, 215, 0.24);
    border-radius: 18px;
    background:
        radial-gradient(circle at 20% 0%, rgba(105, 244, 193, 0.17), transparent 38%),
        radial-gradient(circle at 82% 8%, rgba(105, 194, 244, 0.15), transparent 34%),
        linear-gradient(145deg, rgba(13, 33, 35, 0.96), rgba(3, 11, 17, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.inventory-mix-device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(141, 240, 215, 0.16);
}

.inventory-mix-device-title-block {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.inventory-mix-device-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 18px;
    border: 1px solid rgba(159, 255, 218, 0.28);
    background: rgba(56, 116, 98, 0.24);
    box-shadow: inset 0 0 24px rgba(111, 255, 188, 0.16), 0 0 24px rgba(111, 255, 188, 0.14);
    font-size: 30px;
}

.inventory-mix-device-title-block h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: 0;
}

.inventory-mix-device-title-block p {
    margin: 8px 0 0;
    max-width: 720px;
    color: rgba(238, 251, 244, 0.68);
    font-size: 16px;
    line-height: 1.45;
}

.inventory-mix-device-close {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(164, 230, 238, 0.28);
    border-radius: 14px;
    background: rgba(16, 33, 42, 0.72);
    color: #f4fffb;
    font-size: 28px;
    font-weight: 800;
    cursor: pointer;
}

.inventory-mix-device-body {
    display: grid;
    grid-template-columns: minmax(380px, 0.92fr) minmax(320px, 0.68fr);
    gap: 22px;
    padding: 24px 28px 28px;
    max-height: calc(min(760px, 100vh - 56px) - 108px);
    overflow: hidden;
}

.inventory-mix-device-chamber,
.inventory-mix-device-picker {
    min-height: 0;
    border: 1px solid rgba(141, 240, 215, 0.18);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(24, 54, 52, 0.78), rgba(5, 17, 22, 0.82));
    box-shadow: inset 0 0 48px rgba(40, 155, 130, 0.08);
}

.inventory-mix-device-chamber {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 20px;
}

.inventory-mix-device-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.inventory-mix-device-slot {
    min-height: 174px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px;
    border: 1px solid rgba(141, 240, 215, 0.22);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 12%, rgba(139, 255, 207, 0.16), transparent 44%),
        rgba(1, 12, 15, 0.54);
    color: #eefbf4;
    cursor: pointer;
    text-align: center;
}

.inventory-mix-device-slot:hover,
.inventory-mix-device-slot.is-filled {
    border-color: rgba(162, 255, 202, 0.52);
    box-shadow: 0 0 24px rgba(111, 255, 188, 0.13);
}

.inventory-mix-device-slot-kicker {
    color: rgba(188, 229, 217, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inventory-mix-device-slot-empty {
    color: rgba(238, 251, 244, 0.48);
    font-size: 18px;
    font-weight: 800;
}

.inventory-mix-device-slot-icon,
.inventory-mix-device-stack-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 255, 189, 0.18), rgba(5, 14, 18, 0.92));
    border: 1px solid rgba(155, 255, 210, 0.22);
}

.inventory-mix-device-slot strong {
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 16px;
    line-height: 1.16;
}

.inventory-mix-device-slot-meta {
    color: rgba(238, 251, 244, 0.58);
    font-size: 12px;
    font-weight: 700;
}

.inventory-mix-device-icon-text {
    font-size: 24px;
    font-weight: 900;
}

.inventory-mix-device-icon-fallback {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b2ff94, #73dbff);
    box-shadow: 0 0 20px rgba(147, 255, 180, 0.42);
}

.inventory-mix-device-reactor {
    display: grid;
    place-items: center;
    min-height: 170px;
}

.inventory-mix-device-reactor span {
    width: 178px;
    height: 178px;
    border-radius: 50%;
    border: 1px solid rgba(166, 255, 211, 0.3);
    background:
        radial-gradient(circle at 50% 50%, rgba(180, 255, 144, 0.58), rgba(64, 193, 147, 0.16) 32%, transparent 58%),
        conic-gradient(from 0deg, rgba(132, 255, 198, 0.08), rgba(142, 222, 255, 0.28), rgba(132, 255, 198, 0.08));
    box-shadow: 0 0 68px rgba(105, 247, 176, 0.28), inset 0 0 36px rgba(255, 255, 255, 0.08);
}

.inventory-mix-device-submit {
    min-height: 58px;
    border: 1px solid rgba(181, 255, 159, 0.4);
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 0%, rgba(199, 255, 152, 0.48), transparent 58%),
        linear-gradient(180deg, rgba(59, 131, 55, 0.92), rgba(16, 44, 27, 0.96));
    color: #f7fff5;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 0 28px rgba(151, 255, 115, 0.18);
}

.inventory-mix-device-submit.is-disabled,
.inventory-mix-device-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.inventory-mix-device-picker {
    padding: 18px;
    overflow: hidden;
}

.inventory-mix-device-picker-empty {
    height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    color: rgba(238, 251, 244, 0.62);
}

.inventory-mix-device-picker-empty h2,
.inventory-mix-device-picker-head h2 {
    margin: 0;
    color: #eefbf4;
}

.inventory-mix-device-picker-empty p {
    max-width: 320px;
    margin: 10px auto 0;
    line-height: 1.45;
}

.inventory-mix-device-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.inventory-mix-device-picker-head span {
    color: rgba(188, 229, 217, 0.72);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inventory-mix-device-picker-head button {
    border: 1px solid rgba(255, 143, 143, 0.42);
    border-radius: 999px;
    background: rgba(70, 24, 28, 0.6);
    color: #ffd9d9;
    padding: 9px 14px;
    font-weight: 800;
    cursor: pointer;
}

.inventory-mix-device-stack-list {
    display: grid;
    gap: 10px;
    max-height: 480px;
    overflow: auto;
    padding-right: 5px;
}

.inventory-mix-device-stack {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(141, 240, 215, 0.18);
    border-radius: 14px;
    background: rgba(0, 12, 16, 0.56);
    color: #eefbf4;
    text-align: left;
    cursor: pointer;
}

.inventory-mix-device-stack:hover,
.inventory-mix-device-stack.is-selected {
    border-color: rgba(162, 255, 202, 0.5);
}

.inventory-mix-device-stack.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.inventory-mix-device-stack-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.inventory-mix-device-stack-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.inventory-mix-device-stack-copy span,
.inventory-mix-device-stack-state {
    color: rgba(238, 251, 244, 0.58);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 860px) {
    .inventory-mix-device {
        align-items: stretch;
        padding: 10px;
    }

    .inventory-mix-device-window {
        max-height: calc(100vh - 20px);
        overflow: auto;
    }

    .inventory-mix-device-header {
        padding: 18px;
    }

    .inventory-mix-device-title-block h1 {
        font-size: 30px;
    }

    .inventory-mix-device-body {
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
        padding: 18px;
    }

    .inventory-mix-device-slots {
        grid-template-columns: 1fr;
    }

    .inventory-mix-device-slot {
        min-height: 132px;
    }

    .inventory-mix-device-stack-list {
        max-height: 360px;
    }
}

@media (max-width: 520px) {
    .inventory-mix-device-title-block {
        align-items: flex-start;
    }

    .inventory-mix-device-title-block p {
        font-size: 14px;
    }

    .inventory-mix-device-mark {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .inventory-mix-device-stack {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .inventory-mix-device-stack-state {
        grid-column: 2;
    }
}
