/*
 * css/pages/student.css — student portal (load after layout.css).
 * Tool panels: restyle shells only; do not override JS-internal control IDs.
 */

/* ==========================================================================
   Section A — v2 bridges, top nav, app shell (mobile bottom nav @767px)
   ========================================================================== */

.student-page {
    --accent-secondary: #2dd4bf;
    /* Match compact #navbar.scrolled outer height (logo + padding + border) */
    --student-navbar-clearance: calc(
        var(--nav-logo-height-compact) + var(--space-3) + var(--space-1) + 1px
    );
    padding-top: var(--student-navbar-clearance);
}

.student-page .desc {
    color: var(--text-muted);
}

/* Legacy button class names (dual with .btn--* in HTML) */
.student-page .btn-primary {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    line-height: var(--leading-tight);
    text-align: center;
    cursor: pointer;
    border-radius: var(--border-radius);
    border: 1px solid var(--accent-primary);
    background: var(--accent-primary);
    color: var(--bg-base);
    transition: var(--transition);
}

.student-page .btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

.student-page .btn-secondary {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    line-height: var(--leading-tight);
    text-align: center;
    cursor: pointer;
    border-radius: var(--border-radius);
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    transition: var(--transition);
}

.student-page .btn-secondary:hover {
    background: var(--accent-primary);
    color: var(--bg-base);
}

.student-page .btn-primary.btn-icon,
.student-page .btn-secondary.btn-icon,
.student-page .btn-secondary.gp-icon-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    padding: 0;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1;
}

/* Player toolbar — gp-icon-btn circle must not override btn-secondary on fretboard/metro */
.student-page .btn-secondary.gp-icon-btn.gp-fretboard-btn,
.student-page .btn-secondary.gp-icon-btn.gp-metro-btn {
    border-radius: var(--border-radius);
    background: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.student-page .btn-secondary.gp-icon-btn.gp-fretboard-btn:hover,
.student-page .btn-secondary.gp-icon-btn.gp-metro-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-base);
}

.student-page .btn-danger,
.student-page .btn-primary.btn-danger {
    background: var(--error);
    color: var(--text-on-accent);
    border-color: var(--error);
}

.student-page .btn-danger:hover,
.student-page .btn-primary.btn-danger:hover {
    background: color-mix(in srgb, var(--error) 88%, var(--text-main));
    border-color: color-mix(in srgb, var(--error) 88%, var(--text-main));
    color: var(--text-on-accent);
}

.student-page .hamburger {
    display: none !important;
}

.student-page #navbar {
    background: var(--bg-base);
    backdrop-filter: none;
    border-top: none;
    border-bottom: 1px solid var(--navbar-scrolled-border);
}

.student-page #navbar.scrolled {
    padding: var(--space-3) 0 var(--space-1);
    box-shadow: none;
}

.student-page #navbar.scrolled::after {
    content: "";
    position: absolute;
    left: 4rem;
    right: 0;
    top: 100%;
    height: 1px;
    pointer-events: none;
    box-shadow: var(--shadow-nav);
}

.student-page #navbar .nav-container {
    max-width: none;
    width: 100%;
    margin-inline: 0;
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
}

.student-page .nav-brand-cluster {
    display: flex;
    align-items: center;
    gap: clamp(0.65rem, 2vw, 1.35rem);
    min-width: 0;
    flex: 1 1 auto;
}

.student-page .student-nav-welcome {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: clamp(0.82rem, 1.85vw, 1rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-main);
    min-width: 0;
}

.student-page .student-nav-welcome #student-name {
    display: inline-block;
    max-width: min(42vw, 14rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.student-page .nav-links .student-area-label {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: var(--text-base);
    color: color-mix(in srgb, var(--text-on-accent) 88%, transparent);
    cursor: default;
    user-select: none;
}

/* ==========================================================================
   Student Area Specific (Safely Scoped)
   ========================================================================== */

.auth-card {
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--bg-surface-light);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.student-page .student-invite-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.student-page .student-invite-overlay.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Guard: the .student-invite-overlay rule above sets display:flex with high specificity,
   which would otherwise override the UA [hidden] { display: none } and cause the
   "create new password" overlay to flash over the login form on every page load.
   Mirrors the same pattern used by .student-logout-dialog-overlay[hidden] below. */
.student-page .student-invite-overlay[hidden] {
    display: none !important;
}

/* Boot loader z-index sits above invite (2200) and logout dialog (2100). */
.student-page #student-boot-loader {
    z-index: 2400;
}
.student-page #student-boot-loader[hidden] {
    display: none !important;
}

/* Student login — fixed overlay (not in document flow) */
.student-page #login-overlay:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 2300;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Hide the login form during boot to prevent flash-of-login for already-signed-in users.
   #login-overlay uses [hidden] until auth-flow reveals the correct screen. */
.student-page #login-overlay[hidden] {
    display: none !important;
}

.student-page:has(#login-overlay:not([hidden])) #student-boot-loader,
.student-page:has(#student-dashboard:not([hidden])) #student-boot-loader,
.student-page:has(#invite-complete-overlay:not([hidden])) #student-boot-loader,
.student-page:has(#invite-set-password-overlay:not([hidden])) #student-boot-loader {
    display: none;
}

/* Fallback: if student.js failed to load within 8s, the inline <script> in student.html
   adds .student-boot-fallback to <html>. Drop the loader and reveal login so the page
   stays usable even when auth never resolved. */
html.boot-fallback .student-page #student-boot-loader,
html.student-boot-fallback .student-page #student-boot-loader { display: none !important; }
html.boot-fallback .student-page:not(.student-session-active) #login-overlay:not([hidden]),
html.student-boot-fallback .student-page:not(.student-session-active) #login-overlay:not([hidden]) { display: flex !important; }
body.student-session-active #login-overlay {
    display: none !important;
}

.student-page .student-invite-card {
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
    margin: 0 auto;
}

.student-page .student-logout-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    background: rgba(17, 17, 17, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.student-page .student-logout-dialog-overlay[hidden] {
    display: none !important;
}

.student-page .student-logout-dialog-panel {
    background: var(--bg-surface);
    border: 1px solid var(--bg-surface-light);
    border-radius: var(--border-radius);
    padding: 2rem 2.25rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    text-align: center;
}

.student-page .student-logout-dialog-heading.section-title {
    margin: 0 0 0.75rem;
    text-align: center;
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-variation-settings: "wght" 400, "wdth" 100;
    font-size: clamp(1.65rem, 5.5vw, 2.15rem);
    line-height: 1.3;
}

.student-page .student-logout-dialog-heading.section-title::after {
    margin: 0.5rem auto 0;
}

.student-page .student-logout-dialog-message {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-variation-settings: "wght" 200, "wdth" 100;
}

.student-page .student-logout-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.student-page .student-logout-dialog-actions .btn-primary,
.student-page .student-logout-dialog-actions .btn-secondary {
    padding: 0.45rem 1.15rem;
    font-size: 0.75rem;
    letter-spacing: 0.055em;
}

.student-page #student-dashboard > section.section-padding {
    padding-top: 0;
    background: var(--bg-base);
}

.student-page .student-app-section {
    padding-bottom: 0;
    box-sizing: border-box;
    min-height: calc(100vh - var(--student-navbar-clearance, 74px));
}

/* student-app-layout owns the rail + main row; legacy .dashboard row flex must not shrink the shell */
.student-page #student-dashboard.dashboard {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.student-page #student-dashboard.dashboard > section.section-padding {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
}

.student-page #student-dashboard .student-app-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1 1 auto;
    min-height: calc(100vh - var(--student-navbar-clearance, 74px) - 7rem);
    min-width: 0;
}

.student-page #student-dashboard .student-sidebar-rail {
    position: fixed;
    left: 0;
    /* Full viewport height so background meets the navbar with no seam (navbar z-index sits above). */
    top: 0;
    bottom: 0;
    width: 4rem;
    z-index: 999 !important;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: stretch;
    background: var(--bg-base) !important;
    backdrop-filter: none !important;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    /* Below topnav: clearance + extra gap before first rail label (e.g. Practice) */
    padding: calc(var(--student-navbar-clearance, 74px) + 0.85rem) 0.35rem 1rem;
    box-sizing: border-box;
    border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.student-page .student-sidebar-spacer {
    flex: 1 1 auto;
    min-height: 0;
}

.student-page .student-sidebar-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.student-page .sidebar-category-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0rem;
    user-select: none;
    pointer-events: none;
}

.student-page .student-sidebar-actions-top > .sidebar-category-label:first-child {
    margin-top: 0;
}

.student-page #student-dashboard .student-app-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: 4rem;
    background: var(--bg-base) !important;
    overflow: visible !important;
    border-left: none !important;
    box-shadow: none !important;
}

.student-page #student-dashboard .student-app-main-inner {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.15rem 0.35rem 0.35rem !important;
    box-sizing: border-box;
}

/* Student dashboard: no box-shadow (depth from borders / outlines instead). */

.student-page #student-dashboard,
.student-page #student-dashboard *,
.student-page #student-dashboard *::before,
.student-page #student-dashboard *::after {
    box-shadow: none !important;
}

.student-page #student-dashboard .student-sidebar-btn {
    appearance: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    padding: 0;
    position: relative;
}

.student-page #student-dashboard .student-sidebar-btn:hover {
    color: var(--accent-primary);
    border-color: transparent;
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

.student-page #student-dashboard .student-sidebar-btn.is-active,
.student-page #student-dashboard .student-sidebar-btn[aria-current="page"] {
    color: var(--accent-primary);
    border-color: transparent;
    background: transparent;
    /* visible: sidebar tooltips use ::after outside the hit box; hidden clips label text */
    overflow: visible;
    isolation: isolate;
}

/* Same hover fill as other rail icons — must follow .is-active (equal specificity without :hover). */

.student-page #student-dashboard .student-sidebar-btn.is-active:hover,
.student-page #student-dashboard .student-sidebar-btn[aria-current="page"]:hover,
.student-page #student-dashboard .student-sidebar-btn.is-active:focus-visible,
.student-page #student-dashboard .student-sidebar-btn[aria-current="page"]:focus-visible {
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

/* Solid #94CBFB wash at 10% layer opacity so the dark rail shows through. */

.student-page #student-dashboard .student-sidebar-btn.is-active::before,
.student-page #student-dashboard .student-sidebar-btn[aria-current="page"]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--accent-primary);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.student-page #student-dashboard .student-sidebar-btn svg {
    width: 24px;
    height: 24px;
    color: var(--text-main);
    stroke: var(--text-main);
    stroke-width: 1px;
}

/* Lucide sets stroke-width on the root SVG and shapes; keep icons at 1px in the rail */

.student-page #student-dashboard .student-sidebar-btn svg :where(path, circle, line, polyline, rect, ellipse, g) {
    stroke-width: 1px;
}

/* Logout: same rail icon weight, slightly muted vs default rail ink */

.student-page #student-dashboard .student-sidebar-logout-btn {
    color: #7d8e8c;
}

.student-page #student-dashboard .student-sidebar-logout-btn svg,
.student-page #student-dashboard .student-sidebar-logout-btn svg :where(path, circle, line, polyline, rect, ellipse, g) {
    color: #7d8e8c;
    stroke: #7d8e8c;
}

.student-page #student-dashboard .student-sidebar-btn:hover svg,
.student-page #student-dashboard .student-sidebar-btn:focus-visible svg {
    color: inherit;
    stroke: currentColor;
}

.student-page #student-dashboard .student-sidebar-btn.is-active svg,
.student-page #student-dashboard .student-sidebar-btn[aria-current="page"] svg {
    position: relative;
    z-index: 1;
    color: inherit;
    stroke: currentColor;
}

/* Active wash uses ::before; tooltip hover styles must not translate that pseudo */

.student-page #student-dashboard .student-sidebar-btn.is-active:hover::before,
.student-page #student-dashboard .student-sidebar-btn.is-active:focus-visible::before,
.student-page #student-dashboard .student-sidebar-btn[aria-current="page"]:hover::before,
.student-page #student-dashboard .student-sidebar-btn[aria-current="page"]:focus-visible::before {
    transform: none;
}

.student-page #student-dashboard .student-sidebar-avatar {
    position: relative;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.student-page #student-dashboard .student-sidebar-avatar:hover {
    color: var(--accent-primary);
    border-color: transparent;
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

.student-page #student-dashboard .student-sidebar-avatar.is-active,
.student-page #student-dashboard .student-sidebar-avatar[aria-current="page"] {
    color: var(--accent-primary);
    border-color: transparent;
    background: transparent;
    overflow: visible;
    isolation: isolate;
}

.student-page #student-dashboard .student-sidebar-avatar.is-active:hover,
.student-page #student-dashboard .student-sidebar-avatar[aria-current="page"]:hover,
.student-page #student-dashboard .student-sidebar-avatar.is-active:focus-visible,
.student-page #student-dashboard .student-sidebar-avatar[aria-current="page"]:focus-visible {
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

.student-page #student-dashboard .student-sidebar-avatar.is-active::before,
.student-page #student-dashboard .student-sidebar-avatar[aria-current="page"]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--accent-primary);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.student-page #student-dashboard .student-sidebar-avatar.is-active:hover::before,
.student-page #student-dashboard .student-sidebar-avatar.is-active:focus-visible::before,
.student-page #student-dashboard .student-sidebar-avatar[aria-current="page"]:hover::before,
.student-page #student-dashboard .student-sidebar-avatar[aria-current="page"]:focus-visible::before {
    transform: none;
}

.student-page #student-dashboard .student-sidebar-avatar.is-active > span,
.student-page #student-dashboard .student-sidebar-avatar[aria-current="page"] > span {
    position: relative;
    z-index: 1;
}

@media (max-width: 1023px){
.student-page {
        --student-mobile-activity-offset: 0px;
        --gp-cmd-mobile-height: 5.25rem;
        --gp-fretboard-mobile-height: 130px;
        --student-bottom-rail-height: calc(0.5rem + 2.75rem + max(0.5rem, env(safe-area-inset-bottom, 0px)));
        --gp-mobile-chrome-top: calc(var(--student-navbar-clearance, 74px) + var(--student-mobile-activity-offset, 0px));
        --gp-mobile-chrome-bottom: calc(var(--student-bottom-rail-height) + var(--gp-cmd-mobile-height, 5.25rem));
        --gp-notation-viewport-h-base: calc(100dvh - var(--gp-mobile-chrome-top) - var(--gp-mobile-chrome-bottom));
    }

.student-page:has(#student-activity-banner.student-activity-banner--nav:not([hidden]):not(.student-activity-banner--hidden)) {
        --student-mobile-activity-offset: 2.75rem;
    }

.student-page #student-dashboard,
.student-page #student-dashboard > section.section-padding,
.student-page #student-dashboard .student-app-layout {
        transform: none;
        filter: none;
    }

.student-page .student-app-section {
        min-height: calc(100dvh - var(--student-navbar-clearance, 74px));
    }

.student-page #student-dashboard .student-app-layout {
        flex-direction: column;
        min-height: 0;
        padding-bottom: var(--student-bottom-rail-height, calc(3.5rem + env(safe-area-inset-bottom, 0px)));
    }

/* Mobile bottom nav — viewport-fixed (do not weaken; test after layout changes) */

.student-page #student-dashboard .student-sidebar-rail {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw;
        margin: 0;
        height: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        z-index: 1000;
        border-right: none;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        padding-top: 0.5rem;
        padding-inline: 0.65rem;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
        gap: 0.85rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

/* Mobile: bottom rail removed (hamburger drawer replaces it). */
.student-page #student-dashboard .student-sidebar-rail {
        display: none !important;
    }

.student-page #student-dashboard .student-app-layout {
        padding-bottom: 0 !important;
    }

.student-page .student-sidebar-spacer {
        display: none;
    }

.student-page .student-sidebar-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.85rem;
        padding: 0 0.75rem;
    }

/* Labels use width:100% in desktop column rail; in horizontal bar use intrinsic width + centering */

.student-page .sidebar-category-label {
        width: auto;
        max-width: none;
        flex: 0 0 auto;
        align-self: center;
        margin: 0 0.5rem; /* Space between categories and icons */
        text-align: center;
        line-height: 1;
        /* Add a vertical divider to the right of the label on mobile */
        padding-right: 0.75rem;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none; /* Remove desktop horizontal divider */
        height: 1.5rem;
        display: flex;
        align-items: center;
    }

.student-page .sidebar-category-label:first-child {
        margin-top: 0;
    }

.student-page .student-sidebar-actions-bottom {
        margin-left: auto;
    }

.student-page #student-dashboard .student-app-main {
        margin-left: 0;
    }

.student-page #student-dashboard .student-app-main-inner {
        padding-bottom: 0;
    }

.student-page #student-dashboard .student-sidebar-btn {
        flex-shrink: 0;
        overflow: hidden;
    }

/* Completely hide tooltip label on mobile (horizontal rail) */

.student-page #student-dashboard .student-sidebar-btn::after {
        display: none !important;
        content: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

/* Tooltip arrow only when not active (active tab uses ::before for wash layer) */

.student-page #student-dashboard .student-sidebar-btn:not(.is-active):not([aria-current="page"])::before {
        display: none !important;
        content: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Sidebar nav: CSS-only tooltips from aria-label */

.student-page .student-sidebar-btn {
    position: relative;
}

.student-page .student-sidebar-btn::after {
    content: attr(aria-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-family: var(--font-body, "Noto Sans", sans-serif);
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--border-radius, 4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    /* Above sibling rail icons inside the stacking context created by isolation on active tabs */
    z-index: 10;
}

.student-page .student-sidebar-btn::before {
    content: "";
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent var(--card-bg) transparent transparent;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 11;
}

/* Label tooltip on hover for all rail buttons including active */

.student-page .student-sidebar-btn:hover::after,
.student-page .student-sidebar-btn:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Tooltip arrow ::before only when inactive — active tab ::before is the wash layer */

.student-page .student-sidebar-btn:not(.is-active):not([aria-current="page"]):hover::before,
.student-page .student-sidebar-btn:not(.is-active):not([aria-current="page"]):focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.student-page .student-activity-banner {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    padding: 0.55rem 2.25rem 0.55rem 0.85rem;
    border-radius: var(--border-radius);
    background: var(--bg-base);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.student-page .student-activity-banner[hidden],
.student-page .student-activity-banner--hidden {
    display: none !important;
}

.student-page .student-activity-banner-dismiss {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.student-page .student-activity-banner-dismiss:hover {
    color: var(--accent-primary);
}

.student-page .student-activity-banner-line {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.15rem 0;
}

.student-page .student-activity-banner-line:hover {
    color: var(--accent-primary);
}

.student-page .student-activity-banner--nav {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(38vw, 16rem);
    margin: 0;
    padding: 0.35rem 1.85rem 0.35rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 55%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

.student-page .student-activity-banner--nav .student-activity-banner-dismiss {
    top: 0.2rem;
    right: 0.2rem;
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1.1rem;
}

.student-page .student-activity-banner--nav .student-activity-banner-line {
    font-size: 0.8rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767px) {
.student-page .student-activity-banner--nav {
        position: fixed;
        top: var(--student-navbar-clearance, 74px);
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 0;
        z-index: 990;
        box-sizing: border-box;
        padding: 0.5rem 3.25rem 0.5rem 0.85rem;
        border-left: none;
        border-right: none;
    }

.student-page .student-activity-banner--nav .student-activity-banner-dismiss {
        top: 50%;
        right: 0.5rem;
        transform: translateY(-50%);
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
        font-size: 1.55rem;
        line-height: 1;
    }

.student-page .student-activity-banner--nav .student-activity-banner-dismiss:hover {
        color: var(--accent-primary);
        background: rgba(255, 255, 255, 0.06);
    }

.student-page .student-activity-banner--nav .student-activity-banner-line {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

.student-page .nav-brand-cluster:has(.student-activity-banner--nav:not([hidden]):not(.student-activity-banner--hidden)) .student-nav-welcome {
        display: none;
    }

.student-page:has(#student-activity-banner.student-activity-banner--nav:not([hidden]):not(.student-activity-banner--hidden)) #student-dashboard .student-app-main-inner {
        padding-top: 2.75rem;
    }
}

/* --- Section B: Practice / guitar player (outer chrome only) --- */

.student-page .student-practice-zone {
    margin-bottom: 0;
    scroll-margin-top: calc(var(--student-navbar-clearance, 74px) + 0.75rem);
}

/* -------------------------------------------------------------------------- */

/* --- Section F: Metronome panel shell (controls unchanged) --- */

/* Student metronome (Web Audio); scoped under .student-page only            */

/* -------------------------------------------------------------------------- */

/* Two classes so padding wins over later `.student-page .dash-panel { padding: 2rem }`. */

.student-page .dash-panel.student-tuner-panel {
    background: var(--bg-surface);
}

.student-page .dash-panel.student-metronome-panel {
    max-width: 500px;
    margin: 0 auto 2rem;
    background: var(--bg-surface);
    padding: 0.75rem clamp(1rem, 3vw, 2rem) 2rem;
    box-sizing: border-box;
    color: var(--text-main);
}

.student-page .dash-panel.student-metronome-panel h2.section-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    /* Slightly smaller than global .section-title (2.5rem) for this compact panel */
    font-size: clamp(1.5rem, 4.2vw, 2.05rem);
}

/* --- Section I: Drums panel shell --- */

.student-page .dash-panel.student-drums-panel h2.section-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 4.2vw, 2.05rem);
}

/* Jam Session: panel min-height matches viewport below navbar (visual match to full-height siderail); moderate density */

.student-page .dash-panel.student-drums-panel {
    min-height: calc(100vh - var(--student-navbar-clearance, 74px) - 0.65rem);
    padding: 1.1rem clamp(0.9rem, 1.85vw, 1.25rem) 1.25rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.student-page .student-drums-panel .jam-layout {
    flex: 1 1 auto;
    margin-top: 0.65rem;
    gap: 1.5rem;
    min-height: 0;
}

.student-page .student-drums-panel .jam-left-panel {
    gap: 0.65rem;
}

.student-page .student-drums-panel .jam-right-panel {
    gap: 0.75rem;
    padding-left: 1.5rem;
}

.student-page .student-drums-panel .jam-key-select {
    margin-bottom: 0.55rem;
}

.student-page .student-drums-panel .bpm-number {
    font-size: clamp(2.75rem, 7vw, 3.75rem);
}

.student-page .student-drums-panel .bpm-text {
    font-size: 0.9rem;
    letter-spacing: 1.5px;
}

.student-page .student-drums-panel .jam-start-btn {
    padding: 1rem 1.1rem;
    font-size: 1.1rem;
    margin-top: 0.65rem;
}

.student-page .student-drums-panel .chord-tracker-container {
    min-height: 52px;
    margin-bottom: 0.6rem;
}

.student-page .student-drums-panel .chord-name {
    font-size: 1.25rem;
}

.student-page .student-drums-panel .bpm-slider-group {
    gap: 0.85rem;
}

.student-page .student-drums-panel .jam-label {
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}

@supports (height: 100svh){
.student-page .dash-panel.student-drums-panel {
        min-height: calc(100svh - var(--student-navbar-clearance, 74px) - 0.65rem);
    }
}

.student-page .student-metronome-display {
    text-align: center;
    margin-bottom: 1.25rem;
}

.student-page .student-metronome-bpm {
    font-size: clamp(3rem, 12vw, 4.5rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    color: var(--accent-primary);
}

.student-page .student-metronome-tempo-name {
    margin-top: 0.35rem;
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 500;
}

.student-page .student-metronome-tempo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.student-page .student-metronome-panel input[type="range"]#student-metronome-bpm-slider {
    flex: 1 1 12rem;
    min-width: 8rem;
    max-width: 20rem;
    width: auto;
    height: 0.45rem;
    padding: 0;
    margin: 0;
    border-radius: 999px;
    background: var(--bg-surface-light);
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    accent-color: var(--accent-primary);
}

.student-page .student-metronome-panel input[type="range"]#student-metronome-bpm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-base);
    cursor: pointer;
}

.student-page .student-metronome-panel input[type="range"]#student-metronome-bpm-slider::-moz-range-thumb {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-base);
    cursor: pointer;
}

.student-page .student-metronome-circle-btn {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.student-page .student-metronome-circle-btn:hover {
    background: rgba(212, 175, 55, 0.12);
}

.student-page .student-metronome-beat-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    min-height: 2rem;
}

.student-page .student-metronome-beat-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--bg-surface-light);
    border: 1px solid rgba(255, 255, 255, 0.12);
    /* Decay when .is-active is removed; active state overrides for instant “on”. */
    transition: background 350ms ease-out, outline 350ms ease-out, transform 350ms ease-out;
}

.student-page .student-metronome-beat-dot.is-active {
    transition: none;
    background: var(--accent-primary);
    outline: 2px solid rgba(212, 175, 55, 0.55);
    outline-offset: 2px;
    transform: scale(1.15);
}

.student-page .student-metronome-beat-dots.stress-enabled .student-metronome-beat-dot:first-child.is-active {
    background: var(--accent-primary);
    outline: 2px solid color-mix(in srgb, var(--accent-primary) 55%, transparent);
    outline-offset: 2px;
}

.student-page .student-metronome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.student-page .student-metronome-start-stop {
    min-width: 8rem;
}

.student-page .student-metronome-fieldset {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--bg-surface-light);
    border-radius: var(--border-radius);
    padding: 1rem 0.85rem 0.85rem;
    margin: 0;
}

.student-page .student-metronome-fieldset .form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.75rem;
}

.student-page .student-metronome-fieldset .form-group:last-child {
    margin-bottom: 0;
}

/* Timer row: keep checkbox + label + time readout on one horizontal line (fieldset form-groups default to column). */

.student-page .student-metronome-fieldset .form-group.student-metronome-timer-row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 0.5rem;
    margin-bottom: 0.5rem;
}

.student-page .student-metronome-fieldset .form-group.student-metronome-timer-row > .student-metronome-checkbox-label,
.student-page .student-metronome-fieldset .form-group.student-metronome-timer-row > .student-metronome-timer-display {
    align-self: center;
}

.student-page .student-metronome-beats-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.student-page .student-metronome-beats-controls input#student-metronome-beats {
    width: 3.5rem;
    text-align: center;
    padding: 0.5rem;
    -moz-appearance: textfield;
}

.student-page .student-metronome-beats-controls input#student-metronome-beats::-webkit-outer-spin-button,
.student-page .student-metronome-beats-controls input#student-metronome-beats::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.student-page .student-metronome-checkbox-row,
.student-page .student-metronome-timer-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
}

.student-page .student-metronome-timer-row .student-metronome-checkbox-label {
    font-size: 0.85rem;
    gap: 0.25rem;
    flex-shrink: 0;
}

.student-page .student-metronome-checkbox-label {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    margin: 0;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.25;
}

/* Custom metronome checkboxes (scoped; inner .container / .checkmark only here) */

.student-page .student-metronome-checkbox-label .container input {
    display: none;
}

.student-page .student-metronome-checkbox-label .container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    font-size: 17px;
    line-height: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    flex: 0 0 auto;
    width: 1.12em;
    height: 1.12em;
    margin-right: 0;
}

.student-page .student-metronome-checkbox-label .container .checkmark {
    position: relative;
    flex-shrink: 0;
    top: 0;
    left: 0;
    height: 1.12em;
    width: 1.12em;
    background-color: #2196f300;
    border-radius: 0.25em;
    transition: all 0.25s;
}

.student-page .student-metronome-checkbox-label .container input:checked ~ .checkmark {
    background-color: var(--accent-primary);
}

.student-page .student-metronome-checkbox-label .container .checkmark::after {
    content: "";
    position: absolute;
    transform: rotate(0deg);
    border: 1px solid rgba(255, 255, 255, 0.45);
    left: 0;
    top: 0;
    width: 0.95em;
    height: 0.95em;
    border-radius: 0.25em;
    transition: all 0.25s, border-width 0.1s;
}

.student-page .student-metronome-checkbox-label .container input:checked ~ .checkmark::after {
    left: 50%;
    top: 50%;
    width: 7px;
    height: 12px;
    border-color: #fff0 white white #fff0;
    border-width: 0 3px 3px 0;
    border-radius: 0;
    transform: translate(-50%, -65%) rotate(45deg);
}

.student-page .student-metronome-timer-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    gap: 0.1rem;
    box-sizing: border-box;
}

.student-page .student-metronome-timer-display .timer-colon {
    color: var(--text-main);
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 0.1rem;
    user-select: none;
}

.student-page .student-metronome-fieldset .form-group .student-metronome-timer-display .timer-segment {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
    flex: 0 0 auto;
    padding: 0.2rem 0.25rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
    font-family: monospace, ui-monospace, monospace;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    height: auto;
    min-height: 0;
    background: var(--bg-base);
    border: 1px solid var(--bg-surface-light);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    box-shadow: none;
    color: var(--text-main);
}

.student-page .student-metronome-timer-row:has(#student-metronome-timer-enabled:not(:checked)) .student-metronome-timer-display .timer-segment,
.student-page .student-metronome-timer-row:has(#student-metronome-timer-enabled:not(:checked)) .student-metronome-timer-display .timer-colon {
    color: var(--text-muted);
    border-color: color-mix(in srgb, var(--text-muted) 30%, transparent);
    background: var(--bg-surface);
    opacity: 0.65;
    pointer-events: none;
    cursor: default;
}

.student-page .student-metronome-timer-row:has(#student-metronome-timer-enabled:not(:checked)) .student-metronome-timer-display .timer-colon {
    border: none;
    background: transparent;
}

.student-page .student-metronome-timer-row:has(#student-metronome-timer-enabled:checked) .student-metronome-timer-display .timer-segment:focus {
    outline: none;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.student-page .student-metronome-subdiv-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.student-page .student-metronome-subdiv-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.student-page .student-metronome-subdiv-btn {
    position: relative;
    appearance: none;
    min-height: 2.85rem;
    padding: 0.35rem 0.25rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--bg-surface-light);
    background: var(--bg-base);
    color: var(--text-main);
    font-size: 0;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.student-page .student-metronome-subdiv-btn svg {
    width: 2.35rem;
    height: 1.55rem;
    display: block;
    margin: 0 auto;
    flex-shrink: 0;
}

.student-page .student-metronome-subdiv-btn svg,
.student-page .student-metronome-subdiv-btn path,
.student-page .student-metronome-subdiv-btn rect,
.student-page .student-metronome-subdiv-btn ellipse {
    pointer-events: none;
}

.student-page .student-metronome-subdiv-btn[aria-pressed="true"] {
    border-color: var(--accent-primary);
    background: rgba(212, 175, 55, 0.12);
    color: var(--accent-primary);
}

.student-page .student-metronome-subdiv-btn:hover {
    border-color: var(--accent-primary);
}

/* The Tooltip Box */

.student-page .student-metronome-subdiv-btn::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-body, "Noto Sans", sans-serif);
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--border-radius, 4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 10;
}

/* The Tooltip Arrow (Triangle) */

.student-page .student-metronome-subdiv-btn::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: var(--card-bg) transparent transparent transparent;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 11;
}

/* Hover & Focus States */

.student-page .student-metronome-subdiv-btn:hover::after,
.student-page .student-metronome-subdiv-btn:focus-visible::after,
.student-page .student-metronome-subdiv-btn:hover::before,
.student-page .student-metronome-subdiv-btn:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px){
.student-page .student-metronome-subdiv-grid {
        grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    }
}

@media (min-width: 961px) {
    /* Metronome — lock to viewport; no document scroll (desktop / tablet landscape) */
    .student-page:has([data-student-panel="metronome"]:not([hidden])) {
        overflow: hidden;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-dashboard .student-app-section {
        min-height: 0;
        height: calc(100dvh - var(--student-navbar-clearance));
        max-height: calc(100dvh - var(--student-navbar-clearance));
        overflow: hidden;
        padding-bottom: 0;
        box-sizing: border-box;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-dashboard .student-app-layout {
        min-height: 0;
        height: 100%;
        overflow: hidden;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-dashboard .student-app-main {
        overflow: hidden;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) .student-app-main-inner {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) .student-tab-panels {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) [data-student-panel="metronome"]:not([hidden]),
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) [data-admin-panel="metronome"]:not([hidden]) {
        --student-tool-viewport: calc(100dvh - var(--student-navbar-clearance) - var(--space-2));
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        max-height: var(--student-tool-viewport);
        justify-content: center;
        align-items: center;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root {
        width: 100%;
        max-width: 500px;
        max-height: 100%;
        margin: 0 auto;
        padding: var(--space-3);
        overflow-y: auto;
        overflow-x: hidden;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-display,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-display {
        margin-bottom: 0.75rem;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-bpm,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-bpm {
        font-size: clamp(2.5rem, 10vw, 3.75rem);
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-tempo-row,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-tempo-row {
        margin-bottom: 1rem;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-beat-dots,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-beat-dots {
        margin-bottom: 1rem;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-actions,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-actions {
        margin-bottom: 1rem;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-fieldset,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-fieldset {
        padding: 0.65rem 0.75rem 0.75rem;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-fieldset .form-group,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-fieldset .form-group {
        margin-bottom: 0.5rem;
    }

    .student-page:has([data-student-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-subdiv-label,
    .student-page:has([data-admin-panel="metronome"]:not([hidden])) #student-metronome-root .student-metronome-subdiv-label {
        margin-bottom: 0.35rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 960px) {
    .student-page #student-metronome-root {
        max-height: none;
        margin: 0 auto 2rem;
    }
}

/* -------------------------------------------------------------------------- */

/* Student chromatic tuner (microphone + autocorrelation)                     */

/* -------------------------------------------------------------------------- */

/* --- Section G: Tuner panel shell --- */

.student-page .student-tuner-panel {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.student-page .student-tuner-focus-hint {
    max-width: 28rem;
    margin: 0.75rem auto 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.student-page .student-tuner-string-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 0.5rem;
}

.student-page .student-tuner-string-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    min-width: 2.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.student-page .student-tuner-string-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.student-page .student-tuner-string-btn.is-active {
    color: var(--accent-primary);
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(212, 175, 55, 0.12);
}

.student-page .student-tuner-string-btn.is-locked {
    outline: 2px solid color-mix(in srgb, var(--accent-primary) 35%, transparent);
    outline-offset: 1px;
}

.student-page .student-tuner-string-label {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
}

.student-page .student-tuner-hz {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

/* Fender-style fan gauge: red flat/sharp wedges, green in-tune center */
.student-page .tuner-meter {
    position: relative;
    width: 100%;
    max-width: 18rem;
    height: 7.5rem;
    margin: 1.75rem auto 1.5rem;
    overflow: visible;
}

.student-page .tuner-meter-arc {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.student-page .tuner-meter-arc__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.student-page .tuner-meter-zone--flat,
.student-page .tuner-meter-zone--sharp {
    fill: color-mix(in srgb, var(--error) 78%, var(--bg-surface));
    stroke: var(--bg-surface);
    stroke-width: 1;
}

.student-page .tuner-meter-zone--tune {
    fill: color-mix(in srgb, var(--success) 82%, var(--bg-surface));
    stroke: var(--bg-surface);
    stroke-width: 1;
}

.student-page .tuner-meter::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 1;
    width: 0.65rem;
    height: 0.65rem;
    transform: translate(-50%, 50%);
    border-radius: 50%;
    background: var(--bg-surface-light);
    border: 2px solid color-mix(in srgb, var(--text-main) 35%, transparent);
    pointer-events: none;
}

.student-page .tuner-guide {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 1.5rem;
    transition: color 0.2s;
}

.student-page .tuner-guide.in-tune {
    color: var(--accent-primary);
}

.student-page .tuner-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 2;
    width: 5px;
    height: 3.75rem;
    border-radius: 3px 3px 0 0;
    background: var(--text-main);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    transition: transform 0.1s linear, background 0.2s;
}

.student-page .tuner-needle.in-tune {
    background: var(--accent-primary);
}

.student-page .tuner-note.in-tune {
    color: var(--accent-primary);
}

.student-page .tuner-note {
    font-size: 5rem;
    font-weight: bold;
    line-height: 1;
}

.student-page .tuner-cents {
    display: block;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.student-page .student-tuner-panel .muted {
    color: var(--text-muted);
}

.student-page .student-tuner-panel .mt-2 {
    margin-top: 0.5rem;
}

/* -------------------------------------------------------------------------- */

/* Student Jam Session (drum loops)                                            */

/* -------------------------------------------------------------------------- */

.student-page .jam-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.student-page .jam-left-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.student-page .jam-right-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-left: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.student-page .jam-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.student-page .jam-left-panel .mt-2 {
    margin-top: 0.5rem;
}

/* Tablet Grid */

.student-page .genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
}

/* Jam Session: genre + progression share same compact 4-col grid and tablet sizing */

.student-page #drums-genre-grid,
.student-page #drums-progression-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.28rem;
}

.student-page #drums-genre-grid .genre-tablet,
.student-page #drums-progression-grid .genre-tablet {
    min-width: 0;
    padding: 0.35rem 0.4rem;
    gap: 0.08rem;
}

.student-page #drums-genre-grid .genre-title,
.student-page #drums-progression-grid .genre-title {
    font-size: 0.72rem;
}

.student-page #drums-genre-grid .genre-subtitle,
.student-page #drums-progression-grid .genre-subtitle {
    font-size: 0.58rem;
    line-height: 1.2;
}

@media (max-width: 720px){
.student-page #drums-genre-grid,
    .student-page #drums-progression-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 420px){
.student-page #drums-genre-grid,
    .student-page #drums-progression-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.student-page .mixer-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 280px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.student-page .mixer-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-page .mixer-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 50px;
    font-weight: bold;
}

.student-page .mute-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.student-page .mute-btn:hover {
    color: var(--text-main);
}

.student-page .mute-btn.is-muted {
    color: var(--error);
}

.student-page .mute-btn svg {
    width: 18px;
    height: 18px;
}

/* Jam Session: mixer sits under progression; smaller footprint */

.student-page .student-drums-panel .jam-mixer-section {
    width: 100%;
}

.student-page .student-drums-panel .jam-mixer-label {
    margin-top: 0.65rem;
    margin-bottom: 0.25rem;
}

.student-page .student-drums-panel .jam-mixer-compact {
    max-width: 200px;
    padding: 0.4rem 0.5rem;
    gap: 0.4rem;
}

.student-page .student-drums-panel .jam-mixer-compact .mixer-row {
    gap: 0.4rem;
}

.student-page .student-drums-panel .jam-mixer-compact .mixer-label {
    font-size: 0.72rem;
    width: 40px;
}

.student-page .student-drums-panel .jam-mixer-compact .mute-btn svg {
    width: 15px;
    height: 15px;
}

.student-page .genre-tablet {
    appearance: none;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.student-page .genre-tablet:hover {
    background: rgba(255, 255, 255, 0.08);
}

.student-page .genre-title {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-main);
}

.student-page .genre-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.student-page .genre-tablet:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-primary) 55%, transparent);
    outline-offset: 2px;
}

/* Active Colors mapping based on data-color attribute */

.student-page .genre-tablet.active {
    background: rgba(255, 255, 255, 0.05);
}

.student-page .genre-tablet.active[data-color="red"] {
    border-color: #ff4b4b;
}

.student-page .genre-tablet.active[data-color="red"] .genre-title {
    color: #ff4b4b;
}

.student-page .genre-tablet.active[data-color="blue"] {
    border-color: #4b9fff;
}

.student-page .genre-tablet.active[data-color="blue"] .genre-title {
    color: #4b9fff;
}

.student-page .genre-tablet.active[data-color="purple"] {
    border-color: #b54bff;
}

.student-page .genre-tablet.active[data-color="purple"] .genre-title {
    color: #b54bff;
}

.student-page .genre-tablet.active[data-color="yellow"] {
    border-color: #ffca4b;
}

.student-page .genre-tablet.active[data-color="yellow"] .genre-title {
    color: #ffca4b;
}

.student-page .genre-tablet.active[data-color="green"] {
    border-color: #4bff8a;
}

.student-page .genre-tablet.active[data-color="green"] .genre-title {
    color: #4bff8a;
}

.student-page .genre-tablet.active[data-color="orange"] {
    border-color: #ff8a4b;
}

.student-page .genre-tablet.active[data-color="orange"] .genre-title {
    color: #ff8a4b;
}

.student-page .genre-tablet.active[data-color="gray"] {
    border-color: rgba(200, 200, 210, 0.55);
}

.student-page .genre-tablet.active[data-color="gray"] .genre-title {
    color: var(--text-main);
}

/* Right Panel Controls */

.student-page .bpm-number {
    font-size: 5rem;
    font-weight: bold;
    line-height: 1;
}

.student-page .bpm-text {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.student-page .bpm-slider-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
}

.student-page .jam-slider {
    flex: 1;
    accent-color: var(--accent-primary);
}

.student-page .jam-start-btn {
    width: 100%;
    max-width: 300px;
    padding: 1.25rem;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.student-page .jam-key-select {
    width: 100%;
    max-width: 200px;
}

.student-page .chord-tracker-container {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 350px;
    min-height: 60px;
    margin-bottom: 1rem;
}

.student-page .chord-block {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.student-page .chord-block.active {
    background: color-mix(in srgb, var(--accent-primary) 15%, transparent);
    border-color: var(--accent-primary);
    color: #fff;
    transform: scale(1.05);
    z-index: 2;
}

.student-page .chord-name { font-size: 1.4rem; font-weight: bold; }

.student-page .chord-numeral { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }

/* -------------------------------------------------------------------------- */

/* Student fretboard / scale explorer                                          */

/* -------------------------------------------------------------------------- */

.student-page .student-fretboard-panel {
    max-width: 800px;
    margin: 0 auto;
}

.student-page .fretboard-controls {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.student-page .fretboard-control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-page .fretboard-control-group label {
    color: var(--text-muted);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0; /* Removes global margin to align perfectly with select boxes */
}

/* Scale Explorer: library upload progress (scoped to fretboard root) */

#student-fretboard-root .library-upload-progress {
    max-width: min(420px, 100%);
    margin: 0.75rem auto 0;
    text-align: center;
    font-family: var(--font-body);
}

#student-fretboard-root .library-upload-progress__label {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

#student-fretboard-root .library-upload-progress__track {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-surface-light);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

#student-fretboard-root .library-upload-progress__fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--accent-primary);
    transition: width 0.2s ease;
    transform: translateZ(0);
}

#student-fretboard-root .library-upload-progress--indeterminate .library-upload-progress__fill {
    width: 32%;
    transition: none;
    animation: library-upload-progress-sweep 1.1s ease-in-out infinite;
}

.student-page .fretboard-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.student-page .fretboard-neck {
    display: flex;
    flex-direction: column;
    min-width: 700px;
    background: var(--bg-surface);
    border-radius: 4px;
    border: 1px solid var(--bg-base);
}

.student-page .fretboard-string {
    display: flex;
    height: 40px;
    position: relative;
}

/* The actual string line */

.student-page .fretboard-string::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-muted);
    z-index: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.student-page .fretboard-string:nth-child(1)::before {
    height: 1px;
}

/* High e */

.student-page .fretboard-string:nth-child(2)::before {
    height: 1.5px;
}

.student-page .fretboard-string:nth-child(3)::before {
    height: 2px;
}

.student-page .fretboard-string:nth-child(4)::before {
    height: 2.5px;
}

.student-page .fretboard-string:nth-child(5)::before {
    height: 3px;
}

.student-page .fretboard-string:nth-child(6)::before {
    height: 4px;
}

/* Low E */

.student-page .fretboard-fret {
    flex: 1;
    border-right: 2px solid var(--text-muted);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.student-page .fretboard-fret.nut {
    flex: 0 0 45px;
    border-right: 6px solid var(--text-muted);
    background: var(--bg-base);
}

/* Fret numbers row */

.student-page .fretboard-labels {
    display: flex;
    height: 24px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: bold;
}

.student-page .fretboard-label {
    flex: 1;
    text-align: center;
}

.student-page .fretboard-label.nut-label {
    flex: 0 0 45px;
}

/* Note Dots */

.student-page .note-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-surface-light);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: background 0.2s, opacity 0.15s ease;
    opacity: 0;
    cursor: pointer;
}

.student-page .note-dot.active {
    opacity: 1;
}

.student-page .note-dot.is-root {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent-primary) 60%, transparent);
}

/* Force the nut (fret 0) notes to always be visible as string labels */

.student-page .fretboard-fret.nut .note-dot {
    opacity: 1;
    background: transparent;
    box-shadow: none;
    color: var(--text-muted); /* Make inactive open strings slightly dimmer */
}

/* Add the circle background back ONLY if the open string is in the scale */

.student-page .fretboard-fret.nut .note-dot.active {
    background: var(--bg-surface-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--text-main);
}

/* Keep the blue root styling intact for open strings */

.student-page .fretboard-fret.nut .note-dot.is-root {
    background: var(--accent-primary);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent-primary) 60%, transparent);
    color: #fff;
}

.student-page .note-dot.is-hidden {
    opacity: 0 !important;
    pointer-events: auto; /* Still allow clicking to bring it back */
}

.student-page .fretboard-fret.nut .note-dot.is-hidden {
    opacity: 0 !important;
}

.student-page .student-dash-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.student-page .student-dash-col {
    min-width: 0;
}

.student-page .student-note-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.student-page .student-note-toggle {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.student-page .student-note-toggle:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.student-page .student-note-toggle.is-active {
    color: var(--accent-primary);
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(212, 175, 55, 0.12);
}

.student-page .student-tab-panels {
    margin-top: 0.15rem;
}

.student-page .student-tab-panel.is-hidden {
    display: none;
}

.student-page .student-tab-panel .dash-panel {
    margin-top: 0;
}

.student-page .flash-pulse {
    animation: studentFlashPulse 2.1s ease-in-out 1;
}

@media (max-width: 960px){
.student-page .student-dash-columns {
        grid-template-columns: 1fr;
    }
}

/* Local file quick-test player: lives outside #soundslices-container (see student.html). */

.student-page .gp-quick-test-mount {
    margin-top: 0;
    min-width: 0;
}

/* Slim inset for fullscreen practice player. */

.student-page .gp-quick-test-mount .gp-player-panel.dash-panel {
    margin-top: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.student-page .dash-panel {
    background: var(--bg-base);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-main);
}

/* --- Sections C–E: Notes, resources, library panel chrome --- */

/* Siderail tab dash-panels: no light outline, square shell (overrides .student-page .dash-panel) */

.student-page .dash-panel.gp-player-panel,
.student-page .dash-panel.student-metronome-panel,
.student-page .dash-panel.student-tuner-panel,
.student-page .dash-panel.student-fretboard-panel,
.student-page .dash-panel.student-drums-panel,
.student-page .dash-panel.notes-panel,
.student-page .dash-panel.resources-panel,
.student-page .dash-panel.gp-library-panel,
.student-page #student-dashboard [data-student-panel="account"] > .dash-panel {
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.student-page .dash-panel.notes-panel {
    background: var(--bg-surface);
    color: var(--text-main);
}

/* Song Library + Resources: shared panel inset and list chrome */

.student-page .dash-panel.gp-library-panel,
.student-page .dash-panel.resources-panel {
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 1.5rem clamp(1rem, 2.75vw, 2rem) 2rem;
}

.student-page .dash-panel.gp-library-panel .gp-library-toolbar,
.student-page .dash-panel.resources-panel .gp-library-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.student-page .dash-panel.gp-library-panel .gp-library-heading-row,
.student-page .dash-panel.resources-panel .gp-library-heading-row {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
}

.student-page .dash-panel.gp-library-panel .gp-library-search-group,
.student-page .dash-panel.resources-panel .gp-library-search-group {
    grid-column: 2;
    justify-self: end;
    width: min(42vw, 190px);
    max-width: 190px;
}

.student-page .gp-library-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.student-page .gp-library-heading-row {
    justify-self: start;
    min-width: 0;
}

.student-page .gp-library-search-group {
    display: flex;
    line-height: 28px;
    align-items: center;
    position: relative;
    justify-self: center;
    width: min(100%, 190px);
    max-width: 190px;
}

.student-page .gp-library-search-input {
    font-family: "Noto Sans", sans-serif;
    width: 100%;
    height: 45px;
    padding-left: 2.5rem;
    border: 1px solid var(--bg-surface);
    border-radius: 12px;
    background-color: var(--bg-base);
    outline: none;
    color: var(--text-main);
    transition: border-color 0.25s cubic-bezier(0.19, 1, 0.22, 1), transform 0.25s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: text;
    z-index: 0;
}

.student-page .gp-library-search-input::placeholder {
    color: var(--text-main);
}

.student-page .gp-library-search-input:hover {
    border-color: var(--bg-surface-light);
}

.student-page .gp-library-search-input:active {
    transform: scale(0.95);
}

.student-page .gp-library-search-input:focus {
    border-color: var(--bg-surface-light);
}

.student-page .gp-library-search-icon {
    position: absolute;
    left: 1rem;
    fill: var(--text-main);
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    z-index: 1;
}

/* Shared column-header typography for Song Library + Resources list headers */
.student-page .dash-list-col-header {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.student-page .dash-list-col-header .gp-library-col-name-btn,
.student-page .dash-list-col-header .gp-library-col-date-btn {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
}

.student-page .gp-library-list-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    /* Same horizontal padding as .gp-library-row-inner so column 1 lines up with row bookmarks */
    padding: 0.85rem 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.student-page .gp-library-col-name-btn,
.student-page .gp-library-col-date-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 0 0.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.student-page .gp-library-col-name-btn {
    justify-self: start;
    padding-left: calc(24px + 0.75rem);
}

.student-page .gp-library-col-name-btn:hover,
.student-page .gp-library-col-date-btn:hover {
    color: var(--accent-primary);
}

.student-page .gp-library-col-name-btn:focus-visible,
.student-page .gp-library-col-date-btn:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.55);
    outline-offset: 2px;
}

.student-page .gp-library-sort-indicator {
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.student-page .gp-library-filter-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-size: 0.82rem;
    border-radius: var(--border-radius);
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.student-page .gp-library-list-header .gp-library-header-filter-btn {
    border: none;
    background: transparent;
    padding: 0;
    gap: 0;
    /* Match .gp-library-ui-bookmark pictogram footprint (24px) so column 1 aligns with list rows */
    justify-self: start;
    align-self: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    justify-content: center;
    align-items: center;
    /* Same inactive grey as .gp-library-ui-bookmark .gp-library-bookmark-pictogram (--icon-secondary-color) */
    color: var(--text-muted);
}

.student-page .gp-library-list-header .gp-library-header-filter-btn:hover {
    /* Same hover tint as row bookmark pictogram (--icon-hover-color) */
    color: var(--accent-primary);
    border-color: transparent;
    background: rgba(255, 255, 255, 0.06);
}

.student-page .gp-library-list-header .gp-library-header-filter-btn.is-active,
.student-page .gp-library-list-header .gp-library-header-filter-btn[aria-pressed="true"] {
    color: var(--accent-primary);
    border: none;
    background: rgba(212, 175, 55, 0.12);
}

.student-page .gp-library-list-header .gp-library-header-filter-btn:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.55);
    outline-offset: 2px;
}

.student-page .gp-library-filter-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.student-page .gp-library-list-header .gp-library-header-filter-btn .gp-library-filter-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.student-page .gp-library-filter-btn:hover {
    color: var(--accent-primary);
    border-color: rgba(212, 175, 55, 0.35);
}

.student-page .gp-library-filter-btn.is-active,
.student-page .gp-library-filter-btn[aria-pressed="true"] {
    color: var(--accent-primary);
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(212, 175, 55, 0.12);
}

.student-page .gp-library-filter-btn:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.55);
    outline-offset: 2px;
}

.student-page .gp-library-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.student-page .gp-library-list > .dash-list-loader,
.student-page .resource-list > .dash-list-loader {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.student-page .gp-library-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.student-page .gp-library-row:first-child {
    border-top: none;
}

.student-page .gp-library-row-inner {
    display: grid;
    grid-template-columns: minmax(24px, auto) 1fr auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.85rem 0.15rem;
    min-width: 0;
    overflow: visible;
}

.student-page .gp-library-row-inner > .gp-library-ui-bookmark,
.student-page .gp-library-row-inner > .student-library-bookmark-spacer,
.student-page .dash-panel.resources-panel .student-resource-row-inner > .gp-library-ui-bookmark,
.student-page .dash-panel.resources-panel .student-resource-row-inner > .student-library-bookmark-spacer {
    overflow: visible;
    justify-self: start;
    position: relative;
    z-index: 1;
}

.student-page .gp-library-row-inner .gp-library-ui-bookmark {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    min-width: 24px;
}

.student-page .gp-library-bookmark-pictogram {
    color: var(--text-muted);
}

.student-page .gp-library-ui-bookmark:hover .gp-library-bookmark-pictogram {
    color: var(--accent-primary);
}

.student-page .gp-library-ui-bookmark input:checked + .gp-library-bookmark-pictogram {
    color: var(--accent-primary);
}

.student-page .gp-library-bookmark-pictogram .gp-library-filter-icon,
.student-page .gp-library-bookmark-pictogram svg path {
    fill: currentColor;
}

/* Row bookmarks: color only — skip celebration pseudo-element animations (avoids flash on list repaint) */
.student-page .gp-library-ui-bookmark.is-animating input:checked + .gp-library-bookmark-pictogram,
.student-page .gp-library-ui-bookmark.is-animating input:checked + .gp-library-bookmark-pictogram::before,
.student-page .gp-library-ui-bookmark.is-animating input:checked + .gp-library-bookmark-pictogram::after {
    animation: none;
}

.student-page .student-library-bookmark-spacer {
    width: 24px;
    min-width: 24px;
    flex-shrink: 0;
    display: inline-block;
}

.student-page .gp-library-open {
    appearance: none;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.15rem 0;
    font: inherit;
}

.student-page .gp-library-open:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.student-page .gp-library-note-icon-wrap {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.student-page .gp-library-text-col {
    min-width: 0;
}

.student-page .gp-library-primary-line,
.student-page .dash-panel.resources-panel .student-resource-title-btn,
.student-page .dash-panel.resources-panel .student-resource-title-text {
    font-family: "Noto Sans", sans-serif;
    font-size: 16px;
    font-weight: 318;
    font-variation-settings: "wdth" 100;
    font-stretch: 100%;
    color: var(--text-main);
}

.student-page .gp-library-date-cell {
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: right;
    padding-left: 0.5rem;
}

.student-page .gp-library-empty {
    list-style: none;
    padding: 1rem 0;
}

@media (max-width: 560px){
.student-page .gp-library-row-inner {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

.student-page .gp-library-date-cell {
        grid-column: 2 / -1;
        text-align: left;
        padding-left: 2.65rem;
    }
}

/* Teacher’s Notes: fixed list area; scroll inside (title + filters stay visible) */

.student-page .dash-panel.notes-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.student-page .dash-panel.notes-panel > h2,
.student-page .dash-panel.notes-panel > #note-controls {
    flex-shrink: 0;
}

.student-page .dash-panel.notes-panel .notes-content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(440px, 50vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.student-page .dash-panel.notes-panel #note-controls {
    color: var(--text-muted);
}

.student-page .dash-panel.notes-panel .notes-content ul,
.student-page .dash-panel.notes-panel .notes-content li {
    color: var(--text-main);
}

.student-page .dash-panel.notes-panel #assignments-list > li:not(.student-note) {
    color: var(--text-muted) !important;
}

.student-page .dash-panel.notes-panel .student-note .student-note-date,
.student-page .dash-panel.notes-panel .student-note .student-note-body {
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-stretch: 100%;
    font-variation-settings: "wght" 300, "wdth" 100;
}

.student-page .dash-panel.notes-panel .student-note .student-note-date {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    color: var(--accent-primary) !important;
}

.student-page .dash-panel.notes-panel .student-note .student-note-body {
    color: var(--text-main);
}

.student-page .dash-panel.notes-panel .student-note .note-pin-btn {
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.student-page .dash-panel.notes-panel .student-note .note-pin-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.student-page .dash-panel.notes-panel .student-note .note-pin-btn.is-pinned {
    color: var(--state-active-text);
    border-color: var(--accent-primary);
    background: var(--state-active-bg);
}

.student-page .dash-panel.notes-panel .student-note {
    background: var(--bg-base) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: border-color 120ms ease, background 120ms ease;
}

.student-page .dash-panel.notes-panel .student-note:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: var(--bg-surface) !important;
}

/* Resources tab: category filter */

.student-page .dash-panel.resources-panel .student-resources-filter-prompt {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
}

.student-page .dash-panel.resources-panel .student-resources-list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.85rem 0.15rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-sizing: border-box;
}

.student-page .dash-panel.resources-panel .student-resources-header-actions-spacer {
    display: none;
}

.student-page .dash-panel.resources-panel .student-resources-filters-col {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    flex: 1 1 auto;
    min-width: 0;
}

.student-page .dash-panel.resources-panel .student-resource-category-select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(100%, 14rem);
    width: auto;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm, 0.875rem);
}

/* Match Library tab list-header bookmark control: no frame, grey idle */

.student-page .dash-panel.resources-panel #student-resources-filter-bookmarks {
    flex-shrink: 0;
    align-self: center;
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    gap: 0;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--border-radius);
}

.student-page .dash-panel.resources-panel #student-resources-filter-bookmarks .gp-library-filter-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.student-page .dash-panel.resources-panel #student-resources-filter-bookmarks:hover {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
}

.student-page .dash-panel.resources-panel #student-resources-filter-bookmarks.is-active,
.student-page .dash-panel.resources-panel #student-resources-filter-bookmarks[aria-pressed="true"] {
    color: var(--accent-primary);
    border: none;
    background: rgba(212, 175, 55, 0.12);
}

.student-page .dash-panel.resources-panel #student-resources-filter-bookmarks:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.55);
    outline-offset: 2px;
}

/* Resources list — desktop grid aligns bookmark | filter/legend | actions | date columns */

@media (min-width: 768px) {
.student-page .dash-panel.resources-panel .student-resources-list-header {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        align-items: center;
        gap: 0.5rem 0.75rem;
        padding: 0.85rem 0.15rem;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        box-sizing: border-box;
    }

.student-page .dash-panel.resources-panel .student-resources-header-actions-spacer {
        display: block;
        min-width: 0;
    }

.student-page .dash-panel.resources-panel .student-resources-list-header .gp-library-col-date-btn {
        justify-self: end;
        text-align: right;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner {
        display: grid;
        grid-template-columns: minmax(24px, auto) 1fr auto auto;
        align-items: center;
        gap: 0.5rem 0.75rem;
        padding: 0.85rem 0.15rem;
        min-width: 0;
        box-sizing: border-box;
        overflow: visible;
        white-space: normal;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner .gp-library-date-cell {
        justify-self: end;
        text-align: right;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner .resource-actions {
        justify-self: end;
    }
}

/* Resources tab — mobile: flex columns aligned with header bookmark filter */

@media (max-width: 767px){
.student-page .dash-panel.resources-panel .student-resources-list-header {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        padding: 0.85rem 0.15rem;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        box-sizing: border-box;
    }

.student-page .dash-panel.resources-panel #student-resources-filter-bookmarks {
        flex: 0 0 30px;
        align-self: center;
    }

.student-page .dash-panel.resources-panel .student-resources-filters-col {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem 0.65rem;
    }

.student-page .dash-panel.resources-panel .student-resources-filter-prompt {
        margin-bottom: 0;
        flex: 0 0 auto;
        align-self: center;
    }

.student-page .dash-panel.resources-panel .student-resource-category-select {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 0.5rem 0.65rem;
        padding: 0.85rem 0.15rem;
        min-width: 0;
        overflow: visible;
        white-space: normal;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner .student-resource-title-row {
        grid-column: 2;
        grid-row: 1;
        display: flex !important;
        min-width: 0;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner .gp-library-ui-bookmark,
.student-page .dash-panel.resources-panel .student-resource-row-inner .student-library-bookmark-spacer {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: start;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner .resource-actions {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

.student-page .dash-panel.resources-panel .student-resource-row-inner .gp-library-date-cell {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: end;
        text-align: right;
    }

.student-page .dash-panel.resources-panel .student-resource-title-btn,
.student-page .dash-panel.resources-panel .student-resource-title-text {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.student-page .dash-panel.resources-panel .student-resource-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-main);
}

.student-page .dash-panel.resources-panel .student-resource-title-row > i[data-lucide],
.student-page .dash-panel.resources-panel .student-resource-title-row > svg:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    vertical-align: middle;
}

.student-page .dash-panel.resources-panel .resource-category-badge.genre-tablet,
.student-page .dash-panel.resources-panel .resource-diagram-label-badge.genre-tablet {
    cursor: default;
}

.student-page .dash-panel.resources-panel .resource-category-badge.genre-tablet:hover {
    background: rgba(255, 255, 255, 0.05);
}

.student-page .dash-panel.resources-panel .resource-diagram-label-badge.genre-tablet:hover {
    background: rgba(255, 255, 255, 0.02);
}

.student-page .dash-panel.resources-panel .resource-category-badge.genre-tablet {
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    max-width: min(40vw, 11rem);
    gap: 0;
}

.student-page .dash-panel.resources-panel .resource-category-badge .genre-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    line-height: 1.2;
    font-size: 0.7rem;
}

.student-page .dash-panel.resources-panel .resource-diagram-label-badge.genre-tablet {
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.4rem;
    font-size: 0.62rem;
    max-width: min(42vw, 12rem);
    gap: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.student-page .dash-panel.resources-panel .resource-diagram-label-badge .genre-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    line-height: 1.2;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
}

.student-page .dash-panel.resources-panel .resource-diagram-label-badge[data-label-tag="note-names"] {
    border-color: rgba(255, 255, 255, 0.35);
}

.student-page .dash-panel.resources-panel .resource-diagram-label-badge[data-label-tag="note-names"] .genre-title {
    color: var(--text-main);
}

.student-page .dash-panel.resources-panel .resource-diagram-label-badge[data-label-tag="scale-intervals"] {
    border-color: rgba(200, 200, 210, 0.45);
}

.student-page .dash-panel.resources-panel .resource-diagram-label-badge[data-label-tag="scale-intervals"] .genre-title {
    color: var(--text-muted);
}

.student-page .dash-panel.resources-panel .student-resource-title-btn,
.student-page .dash-panel.resources-panel .student-resource-title-text {
    line-height: 1.25;
}

.student-page .dash-panel.resources-panel .student-resource-title-btn {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    font-family: "Noto Sans", sans-serif;
    font-size: 16px;
    font-weight: 318;
    font-variation-settings: "wdth" 100;
    font-stretch: 100%;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
}

.student-page .dash-panel.resources-panel .student-resource-title-btn:hover,
.student-page .dash-panel.resources-panel .student-resource-title-btn:focus-visible {
    color: var(--accent-primary);
    text-decoration: underline;
}

.student-page .dash-panel.resources-panel .student-resource-title-btn:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.55);
    outline-offset: 2px;
}

@media (min-width: 768px) {
.student-page .dash-panel.resources-panel .student-resource-category-select {
        max-width: 18rem;
    }
}

.student-page .dash-panel.resources-panel #resources-list > li {
    color: var(--text-main);
}

.student-page .dash-panel.resources-panel #resources-list > li:not(:has(> div)) {
    color: var(--text-muted) !important;
}

.student-page .dash-panel.resources-panel .student-resource-title-row {
    color: var(--text-main);
}

.student-page .dash-panel.resources-panel .resource-list a {
    color: var(--accent-primary);
}

.student-page .dash-panel.resources-panel .resource-list > li:has(> div):not(.student-resource-row) {
    background: var(--bg-base);
    border: none;
    border-radius: 0;
    padding: 0.65rem 0.85rem;
    box-sizing: border-box;
}

.student-page .dash-panel.resources-panel .resource-list > li.student-resource-row {
    background: transparent;
    border-radius: 0;
}

.student-page .dash-panel h2,
.student-page .dash-panel h3 {
    margin-bottom: 1rem;
}

.student-page .dash-panel.notes-panel h2.section-title,
.student-page .dash-panel.resources-panel h2.section-title {
    color: var(--text-main);
}

.student-page .notes-content ul {
    list-style-type: none;
    padding-left: 0;
    color: var(--text-main);
}

.student-page .student-note .note-pin-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--bg-surface-light);
    background: rgba(0, 0, 0, 0.12);
    color: var(--text-muted);
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.student-page .student-note .note-pin-btn:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, 0.18);
    color: var(--text-main);
}

.student-page .student-note .note-pin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.student-page .student-note .note-pin-btn svg {
    width: 16px;
    height: 16px;
}

.student-page .dash-panel.resources-panel .student-resource-row-inner {
    overflow: visible;
    white-space: normal;
}

.student-page .resource-list li.student-resource-row {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
    padding: 0;
    box-sizing: border-box;
}

.student-page .resource-list li.student-resource-row .student-resource-row-inner {
    border-bottom: none;
}

.student-page .resource-list li:not(.student-resource-row):not(.dash-list-loader) {
    margin-bottom: 0.75rem;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap !important;
}

.student-page .resource-list li:not(.student-resource-row) > div:first-child {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.student-page .resource-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex: 0 0 auto;
}

.student-page .resource-actions .btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.student-page .resource-actions .btn-icon svg,
.student-page .resource-actions .btn-icon i[data-lucide] {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.student-page .student-resource-action-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: var(--text-sm);
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-muted);
}

.student-page .student-resource-action-spinner .dash-list-loader__spinner {
    width: 1.125rem;
    height: 1.125rem;
    border-width: 2px;
    flex-shrink: 0;
}

/* Account settings tab (stacked layout in [data-student-panel="account"]) */

.student-page .account-settings-container {
    max-width: 600px;
    margin: 0 auto;
    padding-top: 1rem;
}

.student-page .account-section {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--bg-surface-light);
    margin-bottom: 2rem;
}

.student-page .account-section.danger-zone {
    border-color: rgba(207, 102, 121, 0.4);
    background: rgba(207, 102, 121, 0.05);
}

.student-page .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.student-page .password-input-wrapper input {
    padding-right: 3rem;
}

.student-page .password-toggle-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-page .password-toggle-btn:hover {
    color: var(--text-main);
}

.student-page .password-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Student — Account tab legal links */

.student-page .account-legal-section {
    text-align: center;
}

.student-page .account-legal-section .account-legal-heading {
    text-align: center;
}

.student-page .account-legal-section .account-legal-heading.section-title::after {
    margin-left: auto;
    margin-right: auto;
}

/* Account — Security email/password accordions */

.student-page .account-settings-accordion {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.12);
    margin-bottom: 0.75rem;
}

.student-page .account-settings-accordion:last-of-type {
    margin-bottom: 0;
}

.student-page .account-settings-accordion-summary {
    list-style: none;
    cursor: pointer;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.student-page .account-settings-accordion-summary::-webkit-details-marker {
    display: none;
}

.student-page .account-settings-accordion-summary::after {
    content: "";
    flex-shrink: 0;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg) translateY(-0.12rem);
    opacity: 0.75;
}

.student-page .account-settings-accordion[open] .account-settings-accordion-summary::after {
    transform: rotate(-135deg) translateY(0.1rem);
}

.student-page .account-settings-accordion-body {
    padding: 0 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.student-page .account-settings-accordion-body .form-group:last-of-type {
    margin-bottom: 0.75rem;
}

/* Login — Remember me (checkbox must override global input { width:100%; padding:1rem }) */

.student-page .login-remember-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.25rem;
}

.student-page .login-remember-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1.35;
    white-space: nowrap;
}

.student-page .login-remember-label input[type="checkbox"] {
    width: auto;
    min-width: 1rem;
    max-width: none;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--accent-primary);
}

.student-page .login-remember-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

/* Account — profile grid */

.student-page .account-profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

.student-page .account-profile-tutor-note {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}

.student-page .account-profile-info-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 0.12rem;
    color: var(--accent-primary);
}

.student-page #student-dashboard .student-sidebar-avatar {
    overflow: hidden;
}

.student-page #student-dashboard .student-sidebar-avatar .student-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.student-page #student-dashboard .student-sidebar-avatar .student-avatar-img[hidden] {
    display: none !important;
}

.student-page .account-legal-section .account-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 0.5rem;
}

.student-page .account-legal-section .account-legal-links a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.student-page .account-legal-section .account-legal-links a:hover {
    filter: brightness(1.08);
}

/* ==========================================================================
   6. Student Portal — AlphaTab / guitar player → v2/css/components/player.css
   ========================================================================== */


/* ==========================================================================
   8. Media — Mobile UX hotfixes (max-width: 767px; student guitar player)
   ========================================================================== */

@media (max-width: 767px){
/* 1. Prevent Library Dates from wrapping under titles */

.student-page .gp-library-row-inner {
        grid-template-columns: auto 1fr auto !important;
        grid-template-rows: auto !important;
    }

.student-page .gp-library-date-cell {
        grid-column: auto !important;
        text-align: right !important;
        padding-left: 0.5rem !important;
    }

/* 2. Dock Control Panel flush with Navrail */

.student-page .gp-cmd {
        position: fixed !important;
        bottom: var(--student-bottom-rail-height, calc(3.5rem + env(safe-area-inset-bottom, 0px))) !important;
        margin-bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 900 !important;
        min-height: var(--gp-cmd-mobile-height, 5.25rem);
        box-sizing: border-box;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        background: var(--bg-surface) !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.6) !important;
        isolation: auto !important;
    }

.student-page #student-dashboard .student-tab-panel[data-student-panel="dashboard"] {
        margin-left: -0.35rem;
        margin-right: -0.35rem;
        width: calc(100% + 0.7rem);
        max-width: none;
        box-sizing: border-box;
    }

/* 3. Lock Tracking Boundaries & Zoom Sheet */

.student-page #student-dashboard .gp-player-panel,
.student-page #student-dashboard .gp-player-panel .gp-player-root {
        overflow: visible !important;
    }

.student-page #student-dashboard .gp-player-root {
        width: 100% !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

.student-page #student-dashboard .gp-player-panel .gp-player-root > .at-main {
        z-index: 0 !important;
        isolation: auto !important;
    }

.student-page .gp-player-root > .gp-cmd {
        z-index: 920 !important;
    }

.student-page #student-dashboard .gp-player-panel .at-main {
        --gp-notation-viewport-h: var(--gp-notation-viewport-h-base);
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: var(--gp-notation-viewport-h) !important;
        min-height: var(--gp-notation-viewport-h) !important;
        max-height: var(--gp-notation-viewport-h) !important;
        padding-bottom: 1rem !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        box-sizing: border-box;
    }

.student-page #student-dashboard .gp-player-panel .gp-player-root[data-gp-fretboard-visible='1'] > .at-main {
        --gp-notation-viewport-h: calc(var(--gp-notation-viewport-h-base) - var(--gp-fretboard-mobile-height, 130px));
    }

@supports (height: 100svh){
.student-page {
            --gp-notation-viewport-h-base: calc(100svh - var(--gp-mobile-chrome-top) - var(--gp-mobile-chrome-bottom));
        }
}

@supports not (height: 100dvh){
.student-page {
            --gp-notation-viewport-h-base: calc(100vh - var(--gp-mobile-chrome-top) - var(--gp-mobile-chrome-bottom));
        }
}

.student-page .gp-display-pop.is-open,
    .student-page .gp-metro-pop.is-open,
    .student-page .gp-tools-pop.is-open {
        position: fixed !important;
        left: 0.75rem !important;
        right: 0.75rem !important;
        top: auto !important;
        bottom: calc(var(--student-bottom-rail-height) + var(--gp-cmd-mobile-height, 5.25rem) + 0.5rem) !important;
        z-index: 1000 !important;
        max-height: calc(100dvh - var(--gp-mobile-chrome-top) - var(--gp-mobile-chrome-bottom) - 1rem) !important;
    }

/* 5. Dock & Thicken the Fretboard (Scales up via width + scroll) */

.student-page #student-dashboard .gp-player-panel .gp-fretboard-wrap {
        position: fixed !important;
        bottom: calc(var(--student-bottom-rail-height) + var(--gp-cmd-mobile-height, 5.25rem)) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 130px !important; /* Tighter container height */
        z-index: 850 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5) !important;
        background: var(--bg-surface) !important;
        overflow-x: auto !important; /* Allows horizontal swiping of the neck */
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

.student-page .gp-player-panel .gp-fretboard-inner {
        width: 900px !important; /* Forcing it wider forces the SVG to scale UP in thickness! */
        height: 100% !important;
    }

/* Song Library toolbar: title left, search flush right */

.student-page .gp-library-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto;
        gap: 0.5rem 0.75rem;
    }

.student-page .gp-library-heading-row {
        grid-column: 1;
        justify-self: start;
    }

.student-page .gp-library-search-group {
        grid-column: 2;
        justify-self: end;
        width: min(42vw, 190px);
        max-width: 190px;
    }

.student-page .gp-player-panel .gp-fretboard-svg {
        transform: none !important; /* Removes native translateY clipping */
        margin: 0 !important;
    }

.student-page .gp-player-panel .gp-fretboard-string {
        stroke-width: 2.5 !important;
        stroke: rgba(226, 232, 240, 0.7) !important;
    }

.student-page .gp-player-panel .gp-fretboard-fret {
        stroke-width: 1.5 !important;
        stroke: rgba(148, 163, 184, 0.9) !important;
    }

/* 4. Force SVG Icon Sizes (targets cmd + tools pop; beats hardcoded inline sizes) */

.student-page .gp-cmd svg,
    .student-page .gp-tools-pop svg {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
    }

.student-page .gp-play-btn svg {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
    }

/* Elevate popovers above docked fretboard and notation; unify surface chrome */

.student-page .gp-display-pop,
    .student-page .gp-metro-pop,
    .student-page .gp-tools-pop {
        z-index: 950 !important;
        background: var(--bg-surface) !important;
        border: 1px solid var(--bg-surface-light) !important;
    }

/* 6. Tools menu row (text outside button; clear any legacy ::after) */

.student-page .gp-tools-pop .gp-fretboard-btn::after {
        content: none !important;
    }

/* 6. Tools Menu Typography (Matches Settings Menu exactly) */

.student-page .gp-tools-row {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.85rem !important;
    }

.student-page .gp-tools-row span {
        color: var(--text-muted) !important;
        font-size: 0.86rem !important;
        line-height: 1.35 !important;
        font-weight: 400 !important;
        font-family: var(--font-body, "Noto Sans", sans-serif) !important;
        text-transform: capitalize !important;
    }

/* 7. Fix cmd-bar switch SVGs only — do not override gp-display-pop toggles */

.student-page .gp-cmd .switch svg.cross {
        width: 8px !important;
        height: 8px !important;
        min-width: 0 !important;
    }

.student-page .gp-cmd .switch svg.checkmark {
        width: 12px !important;
        height: 12px !important;
        min-width: 0 !important;
    }

/* 8. Fretboard active color (match primary brand blue, mobile hotfix scope) */

.student-page .gp-fretboard-btn.is-on,
    .student-page .gp-metro-btn.is-on {
        border-color: var(--accent-primary) !important;
        color: var(--accent-primary) !important;
        outline: 2px solid color-mix(in srgb, var(--accent-primary) 35%, transparent) !important;
    }

/* 11. Reorder transport buttons (metronome, wrench, settings last) */

.student-page .gp-cmd-right,
    .student-page .gp-cmd-bottom-right {
        display: flex !important;
    }

.student-page .gp-metro-menu-host {
        order: 1 !important;
    }

.student-page .gp-tools-menu-host {
        order: 2 !important;
    }

.student-page .gp-display-menu-host {
        order: 3 !important;
    }
}

/* Moved from student.html inline style attributes */
.student-page .student-forgot-password-link {
    font-size: 0.85rem;
}

.student-page .student-invite-desc {
    margin-bottom: 1.5rem;
}

.student-page .student-tuner-ref-notes {
    border-top: 1px solid var(--bg-surface-light);
    padding-top: 1.5rem;
}

.student-page .student-tuner-ref-heading {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.student-page .student-tuner-ref-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.student-page .student-tuner-ref-buttons .ref-note-btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: 3.25rem;
    padding: 0.4rem 0.35rem;
    font-size: 0.8rem;
}

.student-page .student-jam-label-tight {
    margin-bottom: 0.25rem;
}

.student-page .student-jam-label-center {
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

/* --- Section H: Account panel --- */

.student-page .student-account-section-title {
    font-size: 1.5rem;
}

.student-page .student-account-danger-title {
    font-size: 1.5rem;
    color: var(--error);
}

.student-page .student-account-readonly-input {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: transparent;
}

.student-page .student-account-security-desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.student-page .student-account-danger-desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.student-page .student-account-msg {
    margin-bottom: 1rem;
    font-weight: bold;
}

.student-page .student-danger-delete-btn {
    background: var(--error);
    color: #fff;
}

.student-page .account-legal-links--flush {
    margin-bottom: 0;
}
