body.page-template-page-trombone.trombone-active {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

body.page-template-page-trombone.trombone-active #primary {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#trombone-widget {
    width: 100%;
    height: 100%;
    display: none;
    user-select: none;
    overflow: hidden;
}

body.trombone-active #trombone-widget {
    display: flex;
}

/* Header */
.tb-header {
    padding: 12px 24px 10px;
    gap: 16px;
}

.tb-controls {
    gap: 12px;
}

#scale-select[hidden],
#key-select[hidden] {
    display: revert;
    visibility: hidden;
}

/* Mode switch */
.tb-switch {
    gap: 0.5em;
    cursor: pointer;
}

.tb-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tb-switch-track {
    position: relative;
    width: 2.5em;
    height: 1.4em;
    background: color-mix(in srgb, var(--color-1) 18%, var(--color-6));
    border-radius: 1em;
    flex-shrink: 0;
    transition: background 200ms var(--timing-function-subtle);
}

.tb-switch-track::after {
    content: '';
    position: absolute;
    top: 0.15em;
    left: 0.15em;
    width: 1.1em;
    height: 1.1em;
    background: white;
    border-radius: 50%;
    transition: transform 200ms var(--timing-function-subtle);
}

.tb-switch input:checked ~ .tb-switch-track {
    background: var(--color-4);
}

.tb-switch input:checked ~ .tb-switch-track::after {
    transform: translateX(1.1em);
}

.tb-switch-label {
    font-size: var(--font-size-body-xs);
    color: var(--color-6);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tb-switch-label::before {
    content: 'Vrije vogel';
}

.tb-switch input:checked ~ .tb-switch-label::before {
    content: 'In toonaard';
}

/* Stage */
.tb-stage {
    position: relative;
    width: 100%;
    min-height: 0;
    cursor: none;
    overflow: hidden;
}

.tb-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Custom cursor */
#tb-cursor {
    position: absolute;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: opacity 200ms var(--timing-function-subtle);
}

#tb-cursor-dot {
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--color-6);
    transition: transform 100ms var(--timing-function-subtle),
                background 100ms var(--timing-function-subtle);
}

#tb-cursor-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1.5px solid rgba(253, 242, 248, 0.6);
    opacity: 0;
    transition: opacity 200ms var(--timing-function-subtle);
}

#tb-cursor.blowing #tb-cursor-dot {
    transform: scale(1.6);
    background: var(--color-6);
}

#tb-cursor.blowing #tb-cursor-dot::after {
    opacity: 1;
    animation: tb-cursor-pulse 1.2s ease-in-out infinite;
}

@keyframes tb-cursor-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%       { transform: translate(-50%, -50%) scale(1.4); }
}

#tb-breathe-bar {
    width: 100%;
    height: 0.5rem;
    background: transparent;
    overflow: hidden;
    flex-shrink: 0;
    opacity: .8;
}

#tb-breathe-fill {
    height: 100%;
    width: 100%;
    background: #27ae60;
    border-radius: 5rem;
    transition: width 0.05s linear;
}

#tb-breathe-bar.coughing #tb-breathe-fill {
    width: 12% !important;
    background: rgb(204, 69, 62) !important;
    transition: none;
    animation: tb-cough-pulse 0.3s ease-in-out infinite;
}

@keyframes tb-cough-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.2; }
}