/* AlphaTab single-tab page — extracted from single-tab.php (U12.9as) */
body.single-tab { display: flex; flex-direction: column; min-height: 100vh; }
    body.single-tab #page { flex: 1; }
    body.single-tab { padding-bottom: 64px; }

    /* Full-bleed stage (break Bootstrap .container habit) */
    .tab-page-full {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0.35rem var(--hah-shell-pad, 28px) 1.25rem;
    }

    .tab-page-header.hah-title-band {
        margin-bottom: 0.55rem;
    }
    .tab-page-header .entry-title {
        margin: 0;
        font-size: clamp(1.4rem, 2.3vw, 1.95rem);
        line-height: 1.22;
        color: var(--hah-ink, #1a1c1e);
        max-width: none;
    }
    .tab-meta-strip {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.3rem 0.85rem;
        margin-top: 0.35rem;
        font-size: 0.875rem;
        color: var(--hah-ink-muted, #5c636a);
    }
    .tab-meta-strip .meta-item { margin: 0; }
    .tab-meta-strip strong { color: var(--hah-ink, #1a1c1e); font-weight: 600; }
    .tab-meta-strip a { color: var(--hah-link-meta, #6b4f4f); }
    .tab-meta-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.45rem;
    }
    .tab-meta-actions .form-select {
        min-width: 10rem;
        max-width: 16rem;
    }
    .btn-tab-panel {
        border: 1px solid var(--hah-border, #e3e6ea);
        background: var(--hah-surface, #fff);
        color: var(--hah-ink, #1a1c1e);
        border-radius: var(--hah-radius-sm, 6px);
        padding: 0.35rem 0.75rem;
        font-size: 0.875rem;
        font-weight: 600;
        transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    }
    .btn-tab-panel:hover,
    .btn-tab-panel[aria-expanded="true"] {
        border-color: rgba(var(--hah-brand-rgb, 216, 48, 48), 0.45);
        color: var(--hah-brand, #d83030);
        background: #fff;
    }
    .btn-tab-panel:active { transform: scale(0.98); }

    .tab-stage {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        min-width: 0;
    }

    .hah-tab-body {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: start;
    }
    .hah-tab-rail {
        display: none;
        min-width: 0;
    }
    .hah-tab-rail-sticky {
        position: sticky;
        top: 100px;
    }
    @media (min-width: 768px) {
        .hah-tab-body {
            grid-template-columns: minmax(120px, 140px) minmax(0, 1fr) minmax(120px, 140px);
            gap: 16px;
        }
        .hah-tab-rail { display: block; }
    }
    @media (min-width: 1200px) {
        .hah-tab-body {
            grid-template-columns: minmax(160px, 180px) minmax(0, 1fr) minmax(160px, 180px);
            gap: 20px;
        }
    }

    .at-wrap {
        position: relative;
        background: var(--hah-surface, #fff);
        border: 1px solid var(--hah-border, #e3e6ea);
        border-radius: var(--hah-radius, 10px);
        overflow: hidden;
        box-shadow: 0 2px 14px rgba(26, 28, 30, 0.05);
    }

    /* Bottom bar: width/left synced to .at-wrap via JS (not full viewport) */
    #at-player-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        width: auto;
        z-index: 1030;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.55rem 0.9rem;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid var(--hah-border, #e3e6ea);
        border-bottom: none;
        border-radius: var(--hah-radius, 10px) var(--hah-radius, 10px) 0 0;
        box-shadow: 0 -6px 24px rgba(26, 28, 30, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-sizing: border-box;
    }
    @media (prefers-reduced-transparency: reduce) {
        #at-player-controls {
            background: #fff;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }
    }
    body.admin-bar #at-player-controls { bottom: 32px; }
    @media screen and (max-width: 782px) {
        body.admin-bar #at-player-controls { bottom: 46px; }
    }
    #at-player-controls .btn {
        color: var(--hah-ink, #1a1c1e);
        border-color: var(--hah-border, #e3e6ea);
        background: var(--hah-surface, #fff);
    }
    #at-player-controls .btn:hover,
    #at-player-controls .btn.active {
        color: #fff;
        background: var(--hah-brand, #d83030);
        border-color: var(--hah-brand, #d83030);
    }
    #at-player-controls .btn.disabled { opacity: 0.45; pointer-events: none; }
    .at-song-info { color: var(--hah-ink-muted, #5c636a); font-size: 0.875rem; }
    .at-song-position { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--hah-ink, #1a1c1e); }

    .at-cursor-bar { background: rgba(255, 242, 0, 0.25); }
    .at-selection div { background: rgba(64, 64, 255, 0.1); }
    .at-cursor-beat { background: rgba(64, 64, 255, 0.75); width: 3px; }
    .at-highlight * {
        fill: var(--hah-brand);
        stroke: var(--hah-brand);
    }

    .at-viewport {
        overflow: auto;
        height: min(78vh, calc(100dvh - 210px));
        min-height: 420px;
        position: relative;
        scroll-behavior: smooth;
        background: #fafbfc;
    }
    .at-main { position: relative; min-height: 100%; }
    .at-content { position: relative; }

    .at-overlay {
        display: none;
        position: absolute;
        inset: 0;
        z-index: 25;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.88);
        pointer-events: none;
    }
    .at-wrap.loading .at-overlay {
        display: flex;
        pointer-events: auto;
    }
    .at-overlay-content {
        padding: 0.75rem 1.1rem;
        border-radius: var(--hah-radius-sm, 6px);
        background: #fff;
        border: 1px solid var(--hah-border, #e3e6ea);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        font-weight: 600;
        color: var(--hah-ink, #1a1c1e);
    }

    /* Tracks drawer — overlays score, does not shrink full-width stage */
    .tab-rail {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 92vw);
        z-index: 40;
        background: var(--hah-surface, #fff);
        border-left: 1px solid var(--hah-border, #e3e6ea);
        box-shadow: -8px 0 28px rgba(26, 28, 30, 0.1);
        padding: 1rem 1.1rem;
        overflow: auto;
        transform: translateX(105%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        visibility: hidden;
    }
    .tab-stage.is-rail-open .tab-rail {
        transform: translateX(0);
        visibility: visible;
    }
    @media (prefers-reduced-motion: reduce) {
        .tab-rail { transition: none; }
    }
    .tab-rail h4 {
        font-size: 1rem;
        margin: 0 0 0.75rem;
        padding-bottom: 0.45rem;
        border-bottom: 2px solid var(--hah-brand);
        color: var(--hah-ink, #1a1c1e);
    }
    .tab-rail .at-track {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 0.55rem 0;
        border-bottom: 1px solid var(--hah-border, #e3e6ea);
        font-size: 0.9rem;
    }
    .tab-rail .at-track-mute.active,
    .tab-rail .at-track-solo.active {
        background: var(--hah-brand);
        border-color: var(--hah-brand);
        color: #fff;
    }
    .tab-rail-backdrop {
        display: none;
        position: absolute;
        inset: 0;
        z-index: 35;
        background: rgba(26, 28, 30, 0.28);
        border-radius: inherit;
    }
    .tab-stage.is-rail-open .tab-rail-backdrop { display: block; }

    /* Keep post body (if any) readable under the stage */
    .tab-page-full .entry-content > .at-wrap,
    .tab-page-full .entry-content > .tab-stage { background: transparent; box-shadow: none; padding: 0; }

/* U12.9at — was style= on volume range */
.at-track-volume.form-range {
	width: 80px;
}
