.wmb-dev-cache-panel {
    position: fixed;
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    top: max(0.35rem, env(safe-area-inset-top, 0px));
    z-index: 100060;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    font: 12px/1.35 system-ui, -apple-system, Segoe UI, sans-serif;
    pointer-events: none;
}

.wmb-dev-cache-panel--in-title-bar {
    position: relative;
    right: auto;
    top: auto;
    z-index: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.28rem;
    font: inherit;
    pointer-events: auto;
}

.wmb-dev-cache-panel--open {
    z-index: 100080;
    pointer-events: auto;
}

.wmb-dev-cache-panel__toggle,
.wmb-dev-cache-panel__actions button,
.wmb-dev-cache-panel__badges button {
    pointer-events: auto;
}

.wmb-dev-cache-panel__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    pointer-events: auto;
}

.wmb-dev-cache-panel--in-title-bar .wmb-dev-cache-panel__badges {
    justify-content: flex-start;
    gap: 0.28rem;
}

.wmb-dev-cache-panel__toggle {
    border: 1px solid rgba(15, 118, 110, 0.35);
    background: rgba(255, 255, 255, 0.94);
    color: #0f766e;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.wmb-dev-cache-panel__toggle--build-update {
    border-color: #9a3412;
    background: #c2410c;
    color: #fff7ed;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.wmb-dev-cache-panel__toggle--build-update:hover,
.wmb-dev-cache-panel__toggle--build-update:focus-visible {
    background: #9a3412;
}

.wmb-dev-cache-panel__toggle--reloading {
    opacity: 0.78;
    cursor: wait;
    pointer-events: none;
}

.wmb-dev-cache-panel__toggle:focus-visible,
.wmb-dev-cache-panel__actions button:focus-visible,
.wmb-dev-cache-panel__badges button:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.wmb-dev-cache-panel__actions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    bottom: auto;
    right: 0;
    z-index: 100070;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.45rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 118, 110, 0.25);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    min-width: 14rem;
    max-width: min(22rem, calc(100vw - 1.5rem));
    pointer-events: auto;
}

.wmb-dev-cache-panel--in-title-bar .wmb-dev-cache-panel__actions {
    top: calc(100% + 6px);
    bottom: auto;
}

.wmb-dev-cache-panel--open .wmb-dev-cache-panel__actions {
    display: flex;
}

.wmb-dev-cache-panel--demo-hide-badge .wmb-dev-cache-panel__toggle {
    display: none !important;
}

.wmb-dev-cache-panel--demo-hide-badge.wmb-dev-cache-panel--in-title-bar:not(.wmb-dev-cache-panel--open) {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.wmb-dev-cache-panel--admin-flyout.wmb-dev-cache-panel--in-title-bar {
    position: fixed;
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    top: max(2.75rem, calc(env(safe-area-inset-top, 0px) + 2.35rem));
    z-index: 100080;
    width: auto;
    height: auto;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
}

.wmb-dev-cache-panel__actions button {
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: #fff;
    color: #134e4a;
    border-radius: 0.35rem;
    padding: 0.28rem 0.45rem;
    text-align: left;
    cursor: pointer;
}

.wmb-dev-cache-panel__meta {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    color: #475569;
    font-size: 11px;
    padding: 0.1rem 0.2rem 0.2rem;
}

@media (max-width: 640px) {
    .wmb-dev-cache-panel__actions {
        transform: scale(1.5);
        transform-origin: top right;
    }
}

.wmb-dev-cache-panel__meta-line {
    display: block;
    white-space: nowrap;
}

.wmb-dev-cache-panel__meta-line--url {
    white-space: normal;
    word-break: break-all;
}

.wmb-dev-cache-panel .wmb-build-update-badge,
[data-wmb-title-bar-badges] .wmb-build-update-badge {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    min-width: 0;
    padding: 0.22rem 0.55rem;
    font-size: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pet-nav-title-bar-badges {
    display: none;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    flex: 0 0 auto;
    pointer-events: auto;
}

.pet-nav-title-bar-badges:not(:empty),
.pet-nav-title-bar-badges.has-badges {
    display: inline-flex;
}
