html {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Oxygen', sans-serif;
    background-color: #1f232a;
}

body {
    position: relative;
    width: 100%;
    height: 100%;
}

html, body,
.mobile, .mobile *,
.loader,
.db-ui, .db-ui * {
    box-sizing: border-box;
}

.dg .c .selector {
    transform: translate(0, -1px);
}

.mobile {
    display: none;
    position: absolute;
    width: 100%;
    top: 50%;
    padding: 0 30px;
    font-size: 14px;
    line-height: 1.6;
    color: #eef2ff;
    transform: translate3d(0, -50%, 0);
}

.db-ui {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 30;
}

.db-context-nav {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translate3d(-50%, -12px, 0);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(16, 20, 29, 0.52);
    border: 1px solid rgba(225, 236, 255, 0.18);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 240ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.db-context-summary {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 114px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(225, 236, 255, 0.16);
    background: rgba(14, 18, 28, 0.44);
    color: rgba(226, 233, 250, 0.88);
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.01em;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 260ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.db-ui.is-ready .db-context-nav {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
}

.db-ui.is-ready .db-context-summary {
    opacity: 1;
    transform: translateY(0);
}

.db-context-nav__btn {
    appearance: none;
    border: 0;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(236, 243, 255, 0.88);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
}

.db-context-nav__btn.is-active {
    background: linear-gradient(180deg, rgba(114, 155, 255, 0.95) 0%, rgba(82, 131, 248, 0.95) 100%);
    color: #fff;
}

.db-ui__toolbar {
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    opacity: 0;
    transform: translate3d(0, -16px, 0);
    transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1), transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.db-ui.is-ready .db-ui__toolbar {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.db-panel {
    position: absolute;
    right: 16px;
    bottom: 18px;
    width: min(330px, calc(100vw - 32px));
    padding: 16px;
    border-radius: 20px;
    background: rgba(19, 23, 31, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px) saturate(115%);
    -webkit-backdrop-filter: blur(12px) saturate(115%);
    pointer-events: auto;
    max-height: min(82vh, 620px);
    overflow-y: auto;
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.98);
    transform-origin: right bottom;
    transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1), transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.db-panel.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.db-panel__title {
    margin: 0 0 12px;
    font-size: 13px;
    color: rgba(232, 237, 246, 0.95);
    letter-spacing: 0.01em;
}

.db-row {
    margin-bottom: 12px;
}

.db-row:last-child {
    margin-bottom: 0;
}

.db-row--status {
    margin-top: 2px;
}

.db-program-status {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.01em;
    color: rgba(198, 216, 255, 0.82);
}

.db-row label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: rgba(220, 230, 242, 0.84);
}

.db-row input[type='range'] {
    width: 58%;
    accent-color: #8eb8ff;
}


.db-row select {
    width: 58%;
    min-height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(18, 22, 30, 0.75);
    color: #eef3ff;
    padding: 0 10px;
}

.db-btn {
    appearance: none;
    border: 0;
    outline: none;
    pointer-events: auto;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    user-select: none;
    transition: transform 150ms ease, opacity 180ms ease, box-shadow 220ms ease, background-color 220ms ease, color 220ms ease;
}

.db-btn:active {
    transform: scale(0.97);
}

.db-btn[disabled],
.db-btn.is-disabled {
    cursor: not-allowed;
    opacity: 0.4;
    pointer-events: none;
    box-shadow: none;
}

.db-btn--primary {
    color: #f8fbff;
    background: linear-gradient(180deg, rgba(114, 155, 255, 0.95) 0%, rgba(82, 131, 248, 0.95) 100%);
    box-shadow: 0 8px 18px rgba(58, 99, 194, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.db-btn--primary.is-active {
    box-shadow: 0 10px 24px rgba(83, 128, 242, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.db-btn--secondary {
    color: rgba(235, 242, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 14px rgba(0, 0, 0, 0.2);
}

.db-btn--secondary.is-active {
    background: rgba(131, 163, 225, 0.28);
    box-shadow: inset 0 0 0 1px rgba(210, 227, 255, 0.34), 0 8px 18px rgba(36, 57, 101, 0.26);
}

.db-btn--ghost {
    color: rgba(220, 230, 246, 0.85);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 0 0 1px rgba(214, 226, 255, 0.2);
}

.db-btn--icon {
    min-width: 40px;
    width: 40px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: rgba(235, 242, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 14px rgba(0, 0, 0, 0.2);
}

.db-btn--icon.is-muted {
    background: rgba(255, 120, 120, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 160, 160, 0.35), 0 6px 14px rgba(0, 0, 0, 0.2);
}

.db-panel-open .db-ui__toolbar {
    opacity: 0.88;
}

@media (max-width: 720px) {
    .db-context-nav {
        top: 10px;
        width: calc(100vw - 20px);
        justify-content: space-between;
        gap: 6px;
        padding: 6px;
    }

    .db-context-nav__btn {
        flex: 1 1 auto;
        min-height: 30px;
        padding: 0 8px;
        font-size: 11px;
    }

    .db-context-summary {
        top: 100px;
        left: 10px;
        right: 10px;
        font-size: 11px;
        padding: 8px 10px;
    }

    .db-ui__toolbar {
        top: 56px;
        justify-content: space-between;
        gap: 8px;
    }

    .db-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
}
