.wm-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none
}

.wm-layer[hidden],
.wm-window[hidden],
.wm-tray[hidden] {
    display: none !important
}

.wm-backdrop {
    position: absolute;
    inset: 0;
    background: #0005;
    pointer-events: auto;
    backdrop-filter: blur(1px)
}

.wm-window {
    position: absolute;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    background: #fff;
    border: 1px solid #c4b35e;
    border-radius: 5px;
    box-shadow: 0 15px 60px #0005;
    overflow: hidden;
    resize: both;
    min-width: min(360px, calc(100vw - 24px));
    min-height: 220px;
    width: min(960px, calc(100vw - 32px));
    height: min(790px, calc(100dvh - 104px))
}

.wm-window:focus {
    outline: none
}

.wm-window.wm-maximized {
    inset: 12px 12px 54px !important;
    width: auto !important;
    height: auto !important;
    resize: none
}

.wm-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #ffda42;
    border-bottom: 1px solid #dbb62a;
    min-height: 45px;
    padding: 7px 10px 7px 17px;
    cursor: move;
    touch-action: none;
    user-select: none;
    flex-shrink: 0
}

.wm-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0
}

.wm-controls {
    display: flex;
    gap: 5px;
    flex-shrink: 0
}

.wm-controls button {
    width: 30px;
    height: 29px;
    min-height: 29px;
    padding: 0;
    border: 1px solid #dbb62a;
    background: #ffe578;
    color: #292929;
    font-size: 17px;
    border-radius: 3px;
    cursor: pointer
}

.wm-controls button:hover {
    background: #fff1b3
}

.wm-controls button[data-action=close]:hover {
    background: #fff0ef;
    border-color: #c47b73
}

.wm-frame {
    width: 100%;
    flex: 1;
    border: 0;
    background: #f5f5f5;
    min-height: 0
}

.wm-loading {
    position: absolute;
    inset: 46px 0 0;
    background: #fff;
    display: grid;
    place-items: center;
    color: #777;
    font-size: 14px;
    z-index: 1
}

.wm-loading[hidden] {
    display: none
}

.wm-tray {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    display: flex;
    gap: 16px;
    align-items: center;
    min-height: 76px;
    padding: 10px 16px;
    background: #f7f7f7;
    border-top: 3px solid #ffda42;
    box-shadow: 0 -4px 18px #0002
}

.wm-tray-heading {
    flex-shrink: 0;
    display: grid;
    gap: 6px;
}

.wm-tray-heading strong {
    font-size: 13px;
    color: #393939;
}

.wm-tray-count {
    font-size: 11px;
    color: #777;
}

.wm-tray-items {
    display: flex;
    gap: 9px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    padding: 2px;
}

.wm-has-windows main {
    padding-bottom: 85px;
}

.wm-task-title {
    width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.wm-task-status {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #777;
    font-weight: 400;
}

.wm-tray button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    min-height: 49px;
    width: 250px;
    max-width: 250px;
    flex-shrink: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 12px;
    font-size: 12px;
    background: white;
    border: 1px solid #c9c9c9;
    border-radius: 3px;
    cursor: pointer
}

.wm-tray button[aria-pressed=true] {
    background: #fff1b3;
    border-color: #dbc052
}

.wm-tray button[data-minimized=true] {
    border-left: 4px solid #d2a800;
    background: #fffbe8;
}

.wm-window.wm-maximized {
    bottom: 90px !important;
}

@media(max-width:700px) {
    .wm-tray {
        gap: 10px;
        padding: 8px;
        min-height: 80px;
    }

    .wm-tray-heading {
        max-width: 105px;
    }

    .wm-tray-heading strong {
        font-size: 12px;
    }

    .wm-tray-count {
        line-height: 1.5;
    }

    .wm-tray button {
        width: 205px;
    }

    .wm-window {
        height: calc(100dvh - 105px) !important;
    }
}

.wm-discard {
    position: absolute;
    inset: 45px 0 0;
    background: #0004;
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 2
}

.wm-discard-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 24px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 8px 30px #0003
}

.wm-discard-card h2 {
    margin: 0 0 12px;
    font: 600 18px Arial, sans-serif
}

.wm-discard-card p {
    color: #666;
    line-height: 1.6;
    font-size: 14px
}

.wm-discard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px
}

.wm-discard-actions button {
    font: 13px Arial, sans-serif;
    padding: 9px 13px;
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 3px;
    cursor: pointer
}

.wm-discard-actions .wm-keep {
    background: #ffda42;
    border-color: #e0b62b
}

.wm-discard-actions .wm-drop {
    color: #a63030
}

@media(max-width:700px) {
    .wm-window {
        left: 12px !important;
        top: 12px !important;
        width: calc(100vw - 24px) !important;
        height: calc(100dvh - 105px) !important;
        resize: none;
        min-height: 0
    }

    .wm-titlebar {
        cursor: default
    }

    .wm-title {
        font-size: 13px
    }

    .wm-controls {
        gap: 3px
    }

    .wm-titlebar {
        gap: 8px;
        padding-left: 10px
    }
}

.page-heading .actions {
    flex-wrap: wrap;
    max-width: 100%
}