.total-delay {
    position: fixed;
    z-index: 850;
    left: clamp(12px, 3vw, 28px);
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: flex-start;
    gap: 6px;
    max-width: calc(100vw - 100px);
    padding: 7px 8px 7px 10px;
    border: 1px solid rgba(118, 151, 205, 0.3);
    border-radius: 14px;
    background: #f5f8ff;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(236, 243, 255, 0.94));
    box-shadow: 0 10px 28px rgba(10, 28, 61, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    backdrop-filter: blur(18px) saturate(1.35);
    color: #17233c;
    -webkit-font-smoothing: antialiased;
}

.total-delay[hidden] { display: none; }

body[data-theme="dark"] .total-delay {
    background: #14223a;
    background: linear-gradient(150deg, rgba(24, 38, 65, 0.97), rgba(11, 22, 41, 0.95));
    border-color: rgba(142, 174, 229, 0.26);
    box-shadow: 0 12px 30px rgba(2, 7, 18, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    color: #f3f7ff;
}

.total-delay__label,
.total-delay__value { display: block; white-space: nowrap; }
.total-delay__label {
    color: #536583;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
body[data-theme="dark"] .total-delay__label { color: #a9bad7; }
.total-delay__value {
    margin-top: 1px;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.total-delay__close {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: -5px -5px -5px 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #536583;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.total-delay__close:hover { background: rgba(220, 232, 255, 0.74); }
.total-delay__close:focus-visible { outline: 2px solid #3a6df0; outline-offset: 2px; }
.total-delay__close .material-symbols-outlined { font-size: 17px; }
body[data-theme="dark"] .total-delay__close {
    background: transparent;
    color: #c2d0e8;
}
body[data-theme="dark"] .total-delay__close:hover { background: rgba(138, 169, 223, 0.22); }

@media (max-width: 640px) {
    .total-delay {
        left: auto;
        right: calc(10px + env(safe-area-inset-right, 0px));
        top: calc(96px + env(safe-area-inset-top, 0px));
        bottom: auto;
        max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 90px);
        padding: 7px 8px 7px 10px;
    }
}
