.pf-oszi-layout-wrapper {
    --pf-oszi-bg: #081422;
    --pf-oszi-panel: #0f2238;
    --pf-oszi-panel-2: #132b45;
    --pf-oszi-frame: #d7dde5;
    --pf-oszi-screen-bg: #041106;
    --pf-oszi-grid: rgba(52, 121, 93, 0.35);
    --pf-oszi-grid-minor: rgba(36, 87, 66, 0.28);
    --pf-oszi-trace: #34f59d;
    --pf-oszi-trace-glow: rgba(52, 245, 157, 0.45);
    --pf-oszi-accent: #16c6ff;
    --pf-oszi-accent-2: #ffb020;
    --pf-oszi-text: #e7f2ff;
    --pf-oszi-muted: #a4bfd8;
    --pf-oszi-border: rgba(102, 173, 212, 0.35);

    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    color: var(--pf-oszi-text);
    font-family: "Segoe UI", "Tahoma", "Arial", sans-serif;
    overflow: hidden;
}

.pf-oszi-layout-wrapper.pf-oszi-standalone {
    height: 100dvh;
}

.pf-oszi-box *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.pf-oszi-box *::-webkit-scrollbar-track {
    background: #091b2a;
    border-radius: 5px;
    border: 1px solid rgba(86, 140, 173, 0.35);
}

.pf-oszi-box *::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1a638f, #39b4f1);
    border-radius: 5px;
    border: 2px solid #091b2a;
}

.pf-oszi-box *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2787bf, #63d2ff);
}

.pf-oszi-box * {
    scrollbar-width: thin;
    scrollbar-color: #39b4f1 #091b2a;
}

.pf-oszi-box {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--pf-oszi-border);
    background: radial-gradient(circle at top right, #163a5b 0%, var(--pf-oszi-bg) 55%);
}

.pf-oszi-app {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
}

.pf-oszi-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #0e2d44 0%, #1a4c73 42%, #16c6ff 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    overflow: visible;
    z-index: 20;
}

.pf-oszi-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, #0a1f33 0%, #0f3e63 28%, #1579aa 62%, #16c6ff 100%);
    background-size: 300% 300%;
    background-position: 0% 50%;
    pointer-events: none;
    z-index: -1;
    animation: pf-oszi-header-wave 9s ease-in-out infinite;
}

.pf-oszi-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 120% at 20% 30%, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.16) 50%, transparent 72%);
    animation: pf-oszi-header-shimmer 7s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.pf-oszi-header.no-shimmer::before,
.pf-oszi-header.no-shimmer::after,
.pf-oszi-footer.no-shimmer::before,
.pf-oszi-footer.no-shimmer::after {
    animation: none !important;
}

.pf-oszi-header.no-shimmer,
.pf-oszi-footer.no-shimmer {
    background: linear-gradient(135deg, #081522 0%, #0b2438 55%, #0a1e2f 100%);
}

.pf-oszi-launch-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    background: rgba(22, 198, 255, 0.12);
    border-bottom: 1px solid rgba(102, 173, 212, 0.28);
    color: var(--pf-oszi-text);
    font-size: 0.76rem;
}

.pf-oszi-launch-context strong,
.pf-oszi-launch-context span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(9, 27, 42, 0.54);
    border: 1px solid rgba(102, 173, 212, 0.24);
}

@keyframes pf-oszi-header-wave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pf-oszi-header-shimmer {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.pf-oszi-header-compact-logo {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.14) 100%);
    box-shadow: 0 6px 14px rgba(4, 25, 44, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    z-index: 3;
}

.pf-oszi-header-compact-logo-image {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: contain;
    display: block;
}

.pf-oszi-header-left,
.pf-oszi-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.pf-oszi-header-right {
    min-width: 0;
}

.pf-oszi-drag-handle,
.pf-oszi-icon-wrapper,
.pf-oszi-dash-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 3px 10px rgba(4, 25, 44, 0.18);
}

.pf-oszi-drag-handle {
    cursor: grab;
}

.pf-oszi-drag-handle::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 2px;
    background-image: radial-gradient(currentColor 1.2px, transparent 1.3px);
    background-size: 6px 6px;
    color: rgba(255, 255, 255, 0.9);
}

.pf-oszi-icon-wrapper {
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.pf-oszi-icon-wrapper:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.16) 100%);
}

.pf-oszi-icon svg {
    width: 20px;
    height: 20px;
}

.pf-oszi-title-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-oszi-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.05rem, 1.3vw, 1.35rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.pf-oszi-meta {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8rem;
}

.pf-oszi-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    padding: 3px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 1px 4px rgba(8, 17, 31, 0.12);
    cursor: pointer;
}

.pf-oszi-user-avatar {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #08111f;
    font-weight: 800;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 4px rgba(8, 17, 31, 0.16);
}

.pf-oszi-user-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    transform-origin: center;
}

.pf-oszi-user-avatar-fallback {
    position: relative;
    z-index: 1;
}

.pf-oszi-user-name {
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
}

.pf-oszi-dashboard-menu {
    position: relative;
    z-index: 40;
}

.pf-oszi-btn-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 10px;
    height: 34px;
    min-height: 34px;
    border-radius: 999px;
    background: rgba(8, 17, 31, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.pf-oszi-btn-dashboard:hover {
    background: rgba(8, 17, 31, 0.42);
    border-color: rgba(255, 255, 255, 0.34);
}

.pf-oszi-dash-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    box-shadow: none;
    background: transparent;
    border: 0;
}

.pf-oszi-dash-logo {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
}

.pf-oszi-btn-dashboard:hover .pf-oszi-dash-logo {
    transform: rotate(8deg) scale(1.08);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.42));
}

.pf-oszi-dashboard-submenu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: rgba(9, 28, 44, 0.96);
    border: 1px solid rgba(22, 198, 255, 0.34);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 16px 36px rgba(2, 9, 16, 0.42), 0 2px 8px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 80;
}

.pf-oszi-dashboard-submenu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.pf-oszi-dashboard-submenu-item:hover {
    background: rgba(22, 198, 255, 0.16);
    color: #fff;
}

.pf-oszi-dashboard-submenu-switch-ui {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.pf-oszi-dashboard-submenu-switch-state {
    min-width: 30px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 2px 7px;
    color: #065f46;
    background: rgba(16, 185, 129, 0.2);
}

.pf-oszi-dashboard-submenu-switch-track {
    width: 32px;
    height: 18px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.6);
    position: relative;
    transition: background 0.22s ease, border-color 0.22s ease;
}

.pf-oszi-dashboard-submenu-switch-dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transform: translateX(14px);
    transition: transform 0.22s ease;
}

.pf-oszi-dashboard-submenu-switch[aria-checked="false"] .pf-oszi-dashboard-submenu-switch-track {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(190, 24, 93, 0.48);
}

.pf-oszi-dashboard-submenu-switch[aria-checked="false"] .pf-oszi-dashboard-submenu-switch-dot {
    transform: translateX(0);
}

.pf-oszi-dashboard-submenu-switch[aria-checked="false"] .pf-oszi-dashboard-submenu-switch-state {
    color: #9f1239;
    background: rgba(244, 63, 94, 0.18);
}

.pf-oszi-tooltip-anchor {
    position: relative;
}

.pf-oszi-tooltip-anchor::after {
    content: attr(data-pf-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: normal;
    min-width: 84px;
    max-width: min(220px, calc(100vw - 24px));
    text-align: center;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 40;
}

.pf-oszi-tooltip-anchor::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 3px);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(15, 23, 42, 0.94);
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 40;
}

.pf-oszi-tooltip-left::after { left: 0; right: auto; transform: translateY(-4px); }
.pf-oszi-tooltip-left::before { left: 14px; transform: translateY(-4px); }
.pf-oszi-tooltip-right::after { left: auto; right: 0; transform: translateY(-4px); }
.pf-oszi-tooltip-right::before { left: auto; right: 14px; transform: translateY(-4px); }

.pf-oszi-tooltip-anchor:hover::after,
.pf-oszi-tooltip-anchor:focus-visible::after,
.pf-oszi-tooltip-anchor:hover::before,
.pf-oszi-tooltip-anchor:focus-visible::before {
    opacity: 1;
}

.pf-oszi-tooltip-anchor:hover::after,
.pf-oszi-tooltip-anchor:focus-visible::after {
    transform: translateX(-50%) translateY(0);
}

.pf-oszi-tooltip-anchor:hover::before,
.pf-oszi-tooltip-anchor:focus-visible::before {
    transform: translateX(-50%) translateY(0);
}

.pf-oszi-tooltip-left:hover::after,
.pf-oszi-tooltip-left:focus-visible::after,
.pf-oszi-tooltip-left:hover::before,
.pf-oszi-tooltip-left:focus-visible::before,
.pf-oszi-tooltip-right:hover::after,
.pf-oszi-tooltip-right:focus-visible::after,
.pf-oszi-tooltip-right:hover::before,
.pf-oszi-tooltip-right:focus-visible::before {
    transform: translateY(0);
}

@media (hover: none) {
    .pf-oszi-tooltip-anchor::before,
    .pf-oszi-tooltip-anchor::after {
        display: none;
    }
}

.pf-oszi-info-section {
    border-bottom: 1px solid var(--pf-oszi-border);
    background: rgba(10, 20, 34, 0.9);
    padding: 16px 18px;
}

.pf-oszi-info-details {
    width: 100%;
}

.pf-oszi-info-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 14px;
}

.pf-oszi-info-heading {
    display: inline-block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    color: #9ac8e3;
    margin-bottom: 8px;
    font-weight: 700;
}

.pf-oszi-desc {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid rgba(116, 178, 211, 0.24);
    border-radius: 10px;
    background: rgba(13, 31, 49, 0.65);
    padding: 12px;
}
.pf-oszi-desc h3 {
    margin: 0 0 8px;
    color: #8fd9ff;
}

.pf-oszi-desc h4 {
    margin: 12px 0 8px;
    font-size: 0.88rem;
    color: #a6e2ff;
}

.pf-oszi-desc p,
.pf-oszi-desc li {
    color: var(--pf-oszi-muted);
    line-height: 1.42;
    font-size: 0.9rem;
}

.pf-oszi-desc ul {
    margin: 0;
    padding-left: 18px;
}

.pf-oszi-metadata-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid rgba(116, 178, 211, 0.24);
    border-radius: 10px;
    background: rgba(13, 31, 49, 0.65);
    padding: 10px;
    display: grid;
    gap: 6px;
}

.pf-oszi-metadata-item {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 8px;
    align-items: start;
    border-bottom: 1px dashed rgba(133, 187, 216, 0.2);
    padding-bottom: 5px;
}

.pf-oszi-metadata-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

/* ── Shell Responsive (Header/Info) ───────────────────────────────────── */
@media (max-width: 820px) {
    .pf-oszi-header {
        padding: 12px 14px;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .pf-oszi-header-left {
        gap: 10px;
        min-width: 0;
        flex: 1 1 auto;
    }

    .pf-oszi-header-right {
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
        gap: 8px;
        min-width: 0;
    }

    .pf-oszi-meta,
    .pf-oszi-user-name,
    .pf-oszi-dash-label {
        display: none;
    }

    .pf-oszi-user,
    .pf-oszi-btn-dashboard,
    .pf-oszi-icon-wrapper {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        flex: 0 0 40px;
        padding: 0;
        gap: 0;
        justify-content: center;
        align-items: center;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.22);
        box-shadow: none;
    }

    .pf-oszi-user {
        flex: 0 0 auto;
    }

    .pf-oszi-title-section {
        min-width: 0;
    }

    .pf-oszi-title {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pf-oszi-user-avatar,
    .pf-oszi-dash-icon {
        width: 26px;
        height: 26px;
        border-radius: 999px;
    }

    .pf-oszi-btn-dashboard .pf-oszi-dash-logo {
        width: 26px;
        height: 26px;
        display: block;
        margin: 0 auto;
        border-radius: 999px;
        object-fit: contain;
    }

    .pf-oszi-header-compact-logo,
    .pf-oszi-btn-dashboard {
        box-sizing: border-box;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        overflow: hidden;
    }

    .pf-oszi-info-layout {
        grid-template-columns: 1fr;
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-header {
        min-height: 0;
        height: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-header::before,
    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-header::after {
        display: none;
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-header-left {
        display: none;
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-header-right {
        display: none;
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-header-compact-logo {
        display: inline-flex;
        position: fixed;
        top: 10px;
        right: 10px;
        left: auto;
        transform: none;
        z-index: 240;
        width: 48px;
        min-width: 48px;
        height: 48px;
        min-height: 48px;
        background: rgba(8, 20, 34, 0.82);
        border: 1px solid rgba(221, 244, 255, 0.28);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-header-compact-logo-image {
        width: 30px;
        height: 30px;
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-footer {
        display: none;
    }

    .pf-oszi-box.is-mobile-shell-collapsed .pf-oszi-top-btn {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    /* ── Rig / case mobile layout ─────────────────────────── */
    .pf-oszi-content {
        padding: 10px;
    }

    .pf-oszi-case {
        padding: 38px 10px 16px 10px;
        gap: 10px;
    }

    .pf-oszi-right-panel {
        width: 100%;
        flex: none;
        grid-template-columns: 1fr;
    }

    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(1),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(2),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(3),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(4),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(5) {
        grid-column: 1;
        grid-row: auto;
    }

    .pf-oszi-knob-row {
        grid-template-columns: 1fr auto;
        gap: 6px;
    }

    .pf-oszi-knob-shell {
        width: 80px;
        height: 80px;
    }

    .pf-oszi-main-scale {
        width: 96px;
        height: 96px;
        top: -8px;
    }

    .pf-oszi-trigger-slope-grid {
        gap: 8px;
    }

}

.pf-oszi-metadata-label {
    color: #8fb9d5;
    font-size: 0.78rem;
    font-weight: 700;
}

.pf-oszi-metadata-value {
    color: #dff2ff;
    font-size: 0.83rem;
    word-break: break-word;
}

.pf-oszi-content {
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scroll-behavior: smooth;
    position: relative;
}

.pf-oszi-rig {
    position: relative;
    padding-top: 12px;
    padding-bottom: 36px;
    overflow: visible;
    max-width: 1680px;
    margin: 0 auto;
}

.pf-oszi-case {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
    border-radius: 16px;
    background: linear-gradient(175deg, #d9d9da 0%, #c8c9cb 45%, #b7b8bc 100%);
    border: 1px solid #aeb3bb;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 8px rgba(0, 0, 0, 0.15);
    padding: 46px 20px 50px 20px;
}

.pf-oszi-power-cluster {
    position: absolute;
    left: 28px;
    top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.pf-oszi-power-button {
    position: relative;
    width: 56px;
    height: 26px;
    border: 1px solid #7a7d83;
    border-radius: 13px;
    background: linear-gradient(180deg, #ef7272 0%, #b13d3d 100%);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.35), 0 2px 5px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

.pf-oszi-power-button::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f8f9fb 0%, #cdd3da 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: left 140ms ease;
}

.pf-oszi-power-button.pf-oszi-btn-active {
    border-color: #4b915a;
    background: linear-gradient(180deg, #90e2a9 0%, #47a466 100%);
}

.pf-oszi-power-button.pf-oszi-btn-active::after {
    left: 35px;
}

.pf-oszi-power-led {
    width: 28px;
    height: 14px;
    border-radius: 5px;
    background: #2f4f34;
    box-shadow: inset 0 0 7px rgba(0, 0, 0, 0.6);
}

.pf-oszi-power-led.is-on {
    background: #35d665;
    box-shadow: 0 0 9px rgba(53, 214, 101, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.35);
}

.pf-oszi-text-label {
    font-size: 0.92rem;
    color: #1a2535;
    font-weight: 600;
}

.pf-oszi-power-label {
    margin-left: -2px;
}

.pf-oszi-screen-wrap {
    position: relative;
    flex: 1 1 0;
    min-width: 780px;
    background: #0d1013;
    border-radius: 10px;
    padding: 8px;
    box-shadow: inset 0 2px 18px rgba(0, 0, 0, 0.95);
    align-self: flex-start;
}

.pf-oszi-screen-col {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 780px;
    gap: 8px;
    align-self: flex-start;
}

.pf-oszi-screen-col .pf-oszi-screen-wrap {
    flex: none;
    min-width: 0;
    width: 100%;
}

.pf-oszi-screen-bottom-strip {
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 7px 12px;
}

.pf-oszi-screen-strip-item {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    gap: 2px;
}

#pf-oszi-screen-canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 7px;
    background: var(--pf-oszi-screen-bg);
}

.pf-oszi-screen-overlay {
    pointer-events: none;
    position: absolute;
    inset: 8px;
    border-radius: 7px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(0, 0, 0, 0.09) 3px,
        rgba(0, 0, 0, 0.09) 4px
    );
}

.pf-oszi-trigger-marker {
    position: absolute;
    top: 8px;
    left: 50%;
    margin-left: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #39d5ff;
    filter: drop-shadow(0 0 3px rgba(57, 213, 255, 0.8));
    pointer-events: none;
}

.pf-oszi-level-marker {
    position: absolute;
    top: 50%;
    left: 8px;
    margin-top: -6px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #ffb020;
    filter: drop-shadow(0 0 3px rgba(255, 176, 32, 0.8));
    pointer-events: none;
}

.pf-oszi-bnc-port {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f4f4f4 0%, #d7d7d7 38%, #5d6064 40%, #282d33 100%);
    border: 2px solid #8a919a;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.28), inset 0 0 8px rgba(0, 0, 0, 0.6);
}

.pf-oszi-rig-cable {
    position: absolute;
    right: 0;
    top: 0;
    width: 0;
    height: 12px;
    border-radius: 18px;
    background: linear-gradient(90deg, #151a20 0%, #27313c 58%, #45556a 100%);
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
    transform-origin: right center;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.pf-oszi-rig-cable-shadow {
    position: absolute;
    right: 0;
    top: 0;
    width: 0;
    height: 12px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.22);
    filter: blur(2px);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.pf-oszi-rig-cable.is-connecting {
    animation: pf-oszi-cable-connect 900ms ease-out forwards;
}

.pf-oszi-rig-cable.is-connected {
    width: var(--pf-oszi-cable-width, 300px);
    opacity: 1;
}

.pf-oszi-rig-cable.is-disconnecting {
    animation: pf-oszi-cable-disconnect 700ms ease-in forwards;
}

.pf-oszi-rig-cable-shadow.is-connecting {
    animation: pf-oszi-cable-connect 900ms ease-out forwards;
}

.pf-oszi-rig-cable-shadow.is-connected {
    width: var(--pf-oszi-cable-width, 300px);
    opacity: 1;
}

.pf-oszi-rig-cable-shadow.is-disconnecting {
    animation: pf-oszi-cable-disconnect 700ms ease-in forwards;
}

@keyframes pf-oszi-cable-connect {
    0% {
        width: 0;
        opacity: 0;
    }
    35% {
        opacity: 1;
    }
    100% {
        width: var(--pf-oszi-cable-width, 300px);
        opacity: 1;
    }
}

@keyframes pf-oszi-cable-disconnect {
    0% {
        width: var(--pf-oszi-cable-width, 300px);
        opacity: 1;
    }
    100% {
        width: 0;
        opacity: 0;
    }
}

.pf-oszi-right-panel {
    position: relative;
    flex: 0 0 546px;
    width: 546px;
    color: #1e2d3e;
    display: grid;
    grid-template-columns: 248px 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 8px;
    align-content: start;
}

/* Trigger → rechte Spalte, Zeile 1 */
.pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
}

/* Acquisition → rechte Spalte, Zeile 2 */
.pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
}

/* Timebase/Coupling → rechte Spalte, Zeile 3 */
.pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(3) {
    grid-column: 2;
    grid-row: 3;
}

/* Kanaele → linke Spalte, alle Zeilen */
.pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(4) {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: stretch;
}

/* Fine controls → rechte Spalte, Zeile 4 (oder linke wenn Platz) */
.pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(5) {
    grid-column: 1 / span 2;
    grid-row: 4;
}

.pf-oszi-panel-group {
    border: 1px solid #aeb2b9;
    border-radius: 10px;
    background: linear-gradient(180deg, #cdced2 0%, #bebfc4 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -1px 3px rgba(0, 0, 0, 0.08);
    padding: 9px 9px 8px;
}

.pf-oszi-panel-group-trigger {
    background: linear-gradient(180deg, #d2d3d7 0%, #c2c4c9 100%);
}

.pf-oszi-panel-group-acq {
    background: linear-gradient(180deg, #d0d2d6 0%, #c1c4ca 100%);
}

.pf-oszi-panel-group-inputs {
    display: grid;
    gap: 8px;
}

.pf-oszi-channel-block {
    border: 1px solid rgba(142, 147, 157, 0.9);
    border-radius: 10px;
    background: linear-gradient(180deg, #d6d7db 0%, #c6c8ce 100%);
    padding: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    overflow: hidden;
}

.pf-oszi-channel-block-ch1 {
    border-left: 3px solid rgba(65, 227, 154, 0.55);
}

.pf-oszi-channel-block-ch2 {
    border-left: 3px solid rgba(255, 206, 82, 0.65);
}

.pf-oszi-channel-dials {
    display: grid;
    grid-template-columns: 1fr 54px;
    gap: 4px;
    align-items: center;
    margin-top: 2px;
}

.pf-oszi-pos-stack-compact {
    padding: 2px 2px 0;
    gap: 2px;
}

.pf-oszi-main-knob-wrap-compact {
    gap: 2px;
}

.pf-oszi-knob-shell.pf-oszi-knob-shell-small {
    width: 46px;
    height: 46px;
}

.pf-oszi-knob-shell.pf-oszi-knob-shell-small .pf-oszi-main-scale {
    width: 58px;
    height: 58px;
    top: -6px;
}

.pf-oszi-channel-row-ext {
    margin-top: 2px;
}

.pf-oszi-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e2d3e;
    line-height: 1;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pf-oszi-trigger-slope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.pf-oszi-trigger-cell {
    min-width: 0;
}

.pf-oszi-trigger-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pf-oszi-press-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 0;
    background: linear-gradient(180deg, #eeeeee, #c9c9c9);
    box-shadow: 2px 2px 7px rgba(0, 0, 0, 0.35), inset -1px -1px 2px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.pf-oszi-press-btn.pf-oszi-btn-active {
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.35), inset -1px -1px 1px rgba(0, 0, 0, 0.35);
}

.pf-oszi-press-btn.is-armed {
    background: radial-gradient(circle at 34% 30%, #d2ffd8 0%, #65d177 52%, #2b8e47 100%);
    box-shadow: 0 0 8px rgba(61, 225, 113, 0.45), inset 0 -1px 2px rgba(0, 0, 0, 0.3), 1px 1px 3px rgba(0, 0, 0, 0.35);
}

.pf-oszi-press-btn.is-fired {
    background: radial-gradient(circle at 34% 30%, #ffd6d6 0%, #ff6969 48%, #a01313 100%);
    box-shadow: 0 0 12px rgba(255, 72, 72, 0.9), inset 0 -1px 2px rgba(0, 0, 0, 0.3), 1px 1px 3px rgba(0, 0, 0, 0.35);
}

.pf-oszi-trigger-labels {
    display: flex;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 600;
}

.pf-oszi-slope-indicator {
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: 2px;
}

.pf-oszi-trigger-level-row {
    margin-bottom: 8px;
    display: grid;
    gap: 2px;
}

#pf-oszi-trigger-level-value {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.pf-oszi-knob-row {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
    align-items: center;
}

.pf-oszi-knob-row-top {
    margin-bottom: 10px;
}

.pf-oszi-pos-stack {
    display: grid;
    gap: 4px;
    padding: 8px 6px;
}

.pf-oszi-mini-title {
    color: #1e2d3e;
    font-size: 0.9rem;
    font-weight: 600;
}

.pf-oszi-label {
    display: block;
    margin: 8px 0 2px;
    color: #1e2d3e;
    font-size: 0.85rem;
}

.pf-oszi-label-compact {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.pf-oszi-acq-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    align-items: center;
}

.pf-oszi-mini-btn {
    border: 1px solid #7e838d;
    border-radius: 6px;
    background: linear-gradient(180deg, #eef0f3, #c8ccd2);
    color: #2a3443;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25px;
    padding: 6px 4px;
    cursor: pointer;
}

.pf-oszi-mini-btn.is-active {
    background: linear-gradient(180deg, #8df5b5, #49b576);
    color: #08311c;
    border-color: #4c9268;
}

#pf-oszi-stop-btn.is-active {
    background: linear-gradient(180deg, #ffd9d9, #eb8d8d);
    color: #4f0f0f;
    border-color: #b66f6f;
}

#pf-oszi-single-btn.is-active {
    background: linear-gradient(180deg, #ffe9aa, #e8be52);
    color: #4e3a0a;
    border-color: #ab8d3e;
}

.pf-oszi-acq-row-selects {
    margin-top: 6px;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 6px;
}

.pf-oszi-mini-select {
    height: 28px;
    border-radius: 6px;
    border: 1px solid #7f8691;
    background: linear-gradient(180deg, #f4f5f7, #d2d5da);
    color: #24303f;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0 6px;
}

.pf-oszi-acq-status {
    margin-top: 6px;
    border: 1px dashed rgba(89, 97, 112, 0.5);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.72rem;
    color: #2d3846;
    background: rgba(255, 255, 255, 0.35);
    font-family: "Consolas", "Courier New", monospace;
}

.pf-oszi-knob {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f1f2f4 0%, #d6d7d9 48%, #a3a5ab 100%);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.34), inset 0 1px 3px rgba(255, 255, 255, 0.75);
    position: absolute;
    inset: 2px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    z-index: 4;
}

.pf-oszi-knob::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 6px;
    height: 17px;
    margin-left: -3px;
    border-radius: 4px;
    background: #1b2b3c;
    box-shadow: 0 0 4px rgba(22, 198, 255, 0.45);
}

.pf-oszi-knob.is-dragging {
    cursor: grabbing;
}

.pf-oszi-knob-large {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
}

.pf-oszi-main-knob-wrap {
    display: grid;
    justify-items: center;
    gap: 4px;
}

.pf-oszi-knob-shell {
    position: relative;
    width: 104px;
    height: 104px;
}

.pf-oszi-knob-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55), inset 0 1px 4px rgba(0, 0, 0, 0.35);
    background: radial-gradient(circle, #c4c6ca 62%, #9da1a8 100%);
    z-index: 1;
}

.pf-oszi-main-scale {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 124px;
    height: 124px;
    border-radius: 50%;
    pointer-events: none;
    background: repeating-conic-gradient(from -140deg, rgba(105, 109, 116, 0.4) 0 8deg, transparent 8deg 24deg);
    mask: radial-gradient(circle at center, transparent 54%, #000 55%);
    z-index: 2;
}

.pf-oszi-main-label {
    margin-top: 4px;
    color: #959aa3;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.pf-oszi-coupling-row {
    margin: 8px 0 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-oszi-coupling-select {
    width: 80px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #80848d;
    background: linear-gradient(180deg, #25282d, #16181b);
    color: #d2d8df;
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 8px;
    cursor: pointer;
}

.pf-oszi-auto-btn {
    border: 1px solid #67b7dc;
    border-radius: 10px;
    background: linear-gradient(140deg, #8fe8ff 0%, #2ac7ff 100%);
    color: #07334a;
    font-weight: 800;
    letter-spacing: 0.4px;
    font-size: 0.86rem;
    padding: 10px 12px;
    min-width: 66px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(33, 130, 176, 0.35);
}

.pf-oszi-auto-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.pf-oszi-auto-btn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.pf-oszi-channel-row {
    display: grid;
    grid-template-columns: 38px 1fr 28px;
    gap: 5px;
    align-items: center;
}

.pf-oszi-bnc-mini {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.pf-oszi-bnc-mini-ext {
    transform: scale(1.04);
}

.pf-oszi-bnc-svg {
    display: block;
}

.pf-oszi-bnc-svg .outer {
    fill: #d0d3d8;
    stroke: #555;
    stroke-width: 3;
}

.pf-oszi-bnc-svg .inner {
    fill: #ffffff;
    stroke: #555;
    stroke-width: 2;
}

.pf-oszi-bnc-svg .ring {
    fill: #f4c842;
    stroke: #555;
    stroke-width: 2;
}

.pf-oszi-bnc-svg .core {
    fill: #111111;
}

.pf-oszi-bnc-svg .pin {
    fill: #d0d3d8;
    stroke: #555;
    stroke-width: 2;
}

.pf-oszi-channel-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.77rem;
    font-weight: 700;
    color: #1b2937;
    border: 1px solid #8f949d;
    border-radius: 7px;
    background: linear-gradient(180deg, #dedfe3, #c7c9ce);
    padding: 5px 0;
    letter-spacing: 0.2px;
}

.pf-oszi-ch1-tag {
    box-shadow: inset 0 0 0 2px rgba(65, 227, 154, 0.25);
}

.pf-oszi-ch2-tag {
    box-shadow: inset 0 0 0 2px rgba(255, 206, 82, 0.3);
}

.pf-oszi-ext-tag {
    box-shadow: inset 0 0 0 2px rgba(112, 158, 203, 0.3);
}

.pf-oszi-signal-source-select {
    width: 100%;
    height: 26px;
    border-radius: 7px;
    border: 1px solid #67a0c0;
    background: linear-gradient(180deg, #1a2d3f, #0f1d2c);
    color: #c8e8ff;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0 6px;
    cursor: pointer;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.pf-oszi-signal-source-select:focus {
    outline: 2px solid rgba(22, 198, 255, 0.6);
    outline-offset: 1px;
}

.pf-oszi-foot {
    position: absolute;
    width: 84px;
    height: 44px;
    bottom: -30px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(180deg, #b1b3b7, #8f9196);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.38);
}

.pf-oszi-foot-left {
    left: 64px;
}

.pf-oszi-foot-right {
    right: 64px;
}

.pf-oszi-range-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.pf-oszi-range {
    width: 100%;
}

.pf-oszi-value {
    margin-top: 0;
    margin-bottom: 0;
    color: #1e2d3e;
    font-size: 0.8rem;
    font-weight: 600;
}

.pf-oszi-footer {
    border-top: 1px solid var(--pf-oszi-border);
    background: linear-gradient(120deg, #0c1f31 0%, #0e2d44 100%);
    padding: 8px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    overflow: hidden;
    box-shadow: 0 -8px 22px rgba(14, 45, 68, 0.34);
    position: sticky;
    bottom: 0;
    z-index: 100;
    margin-top: auto;
    flex: 0 0 auto;
    min-height: 48px;
}

.pf-oszi-footer-left,
.pf-oszi-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.pf-oszi-footer-left {
    justify-content: flex-start;
}

.pf-oszi-footer-right {
    justify-content: flex-end;
}

.pf-oszi-footer-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    position: relative;
    z-index: 1;
    font-weight: 600;
    text-align: center;
    flex-wrap: nowrap;
    overflow: hidden;
}

.pf-oszi-footer-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.08);
    color: #d9f3ff;
    overflow: hidden;
}

.pf-oszi-footer-icon svg {
    width: 12px;
    height: 12px;
    display: block;
}

.pf-oszi-footer-module {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-oszi-footer-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-oszi-footer-fx-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.10);
    cursor: pointer;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pf-oszi-footer-meta .pf-oszi-footer-icon,
.pf-oszi-footer-module .pf-oszi-footer-icon {
    flex: 0 0 24px;
}

.pf-oszi-footer-meta span:last-child,
.pf-oszi-footer-module span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-oszi-footer-fx-toggle:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.52);
}

.pf-oszi-footer-fx-toggle .pf-oszi-footer-icon-on,
.pf-oszi-footer-fx-toggle .pf-oszi-footer-icon-off {
    width: 12px;
    height: 12px;
}

.pf-oszi-footer-fx-toggle .pf-oszi-footer-icon-off {
    display: none;
}

.pf-oszi-status-pill {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    line-height: 1.1;
    padding: 3px 8px;
    font-size: 0.72rem;
}

.pf-oszi-box.is-footer-fx-off .pf-oszi-footer-fx-toggle {
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.58);
    background: rgba(15, 23, 42, 0.2);
}

.pf-oszi-box.is-footer-fx-off .pf-oszi-footer-fx-toggle .pf-oszi-footer-icon-on {
    display: none;
}

.pf-oszi-box.is-footer-fx-off .pf-oszi-footer-fx-toggle .pf-oszi-footer-icon-off {
    display: inline-flex;
}

.pf-oszi-box.is-footer-fx-off .pf-oszi-footer-fx-toggle:hover {
    background: rgba(15, 23, 42, 0.28);
}

@media (max-width: 820px) {
    .pf-oszi-footer {
        grid-template-columns: minmax(0, 1fr);
        padding: 6px 10px;
    }

    .pf-oszi-footer-left,
    .pf-oszi-footer-right {
        display: none;
    }

    .pf-oszi-footer-center {
        flex-wrap: wrap;
        gap: 4px;
    }

    .pf-oszi-footer-meta {
        display: none;
    }
}

.pf-oszi-profile-suboverlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

.pf-oszi-profile-suboverlay[hidden] {
    display: none !important;
}

.pf-oszi-profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 20, 31, 0.5);
    backdrop-filter: blur(14px) saturate(0.8);
    -webkit-backdrop-filter: blur(14px) saturate(0.8);
    cursor: pointer;
}

.pf-oszi-profile-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pf-oszi-profile-iframe {
    width: 100%;
    flex: 1;
    border: none;
    display: block;
    background: transparent;
}

.pf-oszi-status-pill {
    border: 1px solid rgba(150, 201, 228, 0.25);
    border-radius: 999px;
    font-size: 0.78rem;
    padding: 4px 10px;
    color: #b4ccdf;
    background: rgba(255, 255, 255, 0.05);
}

.pf-oszi-status-pill.is-good {
    color: #adffd8;
    border-color: rgba(66, 216, 152, 0.45);
    background: rgba(47, 162, 116, 0.22);
}

.pf-oszi-status-pill.is-warn {
    color: #ffd79e;
    border-color: rgba(255, 176, 32, 0.55);
    background: rgba(200, 129, 21, 0.22);
}

.pf-oszi-status-pill.is-error {
    color: #ffc0c0;
    border-color: rgba(255, 95, 95, 0.68);
    background: rgba(186, 42, 42, 0.28);
}

@media (max-width: 1440px) {
    .pf-oszi-case {
        flex-direction: column;
    }

    .pf-oszi-screen-wrap {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .pf-oszi-screen-col {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .pf-oszi-right-panel {
        width: 100%;
        flex: none;
        grid-template-columns: 200px 1fr;
    }

    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(1),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(2),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(3),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(4),
    .pf-oszi-right-panel > .pf-oszi-panel-group:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
    }

    .pf-oszi-rig-cable,
    .pf-oszi-rig-cable-shadow {
        display: none;
    }
}

/* ── Back to top button ─────────────────────────────────── */
.pf-oszi-top-btn {
    position: sticky;
    bottom: 20px;
    float: right;
    margin-right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--pf-oszi-border);
    background: linear-gradient(140deg, #1a3858, #0e2235);
    color: var(--pf-oszi-accent);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: opacity 0.25s, transform 0.2s;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
}

.pf-oszi-top-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.pf-oszi-top-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(140deg, #214872, #1a3858);
}
