/* ==========================================================================
   GuitarTunerApp & Music Studio - White & Slate Blue Design System
   Narrow-screen focused (max 820px), utilitarian, high-precision, no emojis.
   ========================================================================== */

:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-accent-soft: #f0f9ff;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --border-focus: #0284c7;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --brand: #0284c7;
    --brand-hover: #0369a1;
    --brand-light: #e0f2fe;
    --brand-dark: #075985;

    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-page);
    overflow-x: hidden;
    max-width: 100%;
}

/* ==========================================================================
   Narrow Layout Container
   ========================================================================== */
.site-container {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   Redesigned Studio Header & Flyout Directory
   Single-layer minimalist bar: clean, utilitarian, white & slate-blue.
   ========================================================================== */
.studio-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.studio-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.studio-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.studio-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.studio-brand-tag {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--brand);
    background: var(--brand-light);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.studio-nav-desktop {
    display: flex;
    align-items: center;
    gap: 6px;
}

.studio-nav-item {
    position: relative;
}

.studio-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.12s ease;
}

.studio-nav-btn:hover, .studio-nav-btn.active {
    color: var(--brand);
    background: var(--bg-subtle);
}

.studio-all-tools-btn {
    display: none; /* Hidden on computer / desktop */
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-strong) !important;
    background: #ffffff !important;
    color: var(--text-primary) !important;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.studio-all-tools-btn:hover {
    border-color: var(--brand) !important;
    color: var(--brand) !important;
    background: var(--bg-accent-soft) !important;
}

/* Dropdown Menu - Bridge gap prevents accidental disappearance on mouse movement */
.has-dropdown {
    position: relative;
    padding-bottom: 6px;
    margin-bottom: -6px;
}

.has-dropdown:hover .studio-dropdown,
.has-dropdown:focus-within .studio-dropdown,
.has-dropdown.is-open .studio-dropdown {
    display: block;
}

.studio-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
    min-width: 220px;
    padding: 6px;
    z-index: 200;
}

/* Invisible hover bridge between button and dropdown */
.studio-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

.dropdown-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 6px 10px 4px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.1s ease;
}

.dropdown-link:hover {
    background-color: var(--bg-accent-soft);
    color: var(--brand);
}

.dropdown-link.selected {
    background-color: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 600;
}

/* Mobile Toggle */
.studio-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Tools Directory Drawer */
.studio-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
}

.studio-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.studio-drawer-panel {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    width: 100%;
    max-width: 760px;
    margin-top: 20px;
    overflow: hidden;
    animation: drawerFadeIn 0.2s ease;
}

@keyframes drawerFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.drawer-body {
    padding: 20px;
}

.drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.drawer-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-cat-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.1s ease;
}

.drawer-link:hover {
    background: var(--bg-accent-soft);
    color: var(--brand);
}

.drawer-link.active {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 700;
}

@media (max-width: 680px) {
    .studio-nav-desktop {
        display: none;
    }
    .studio-all-tools-btn {
        display: inline-flex !important;
    }
    .studio-mobile-toggle {
        display: none;
    }
    .drawer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Main Content Area */
.site-main {
    flex: 1;
    padding: 20px 0 36px;
}

/* Page Titles & Headers */
.tool-header {
    margin-bottom: 18px;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand);
    background: var(--brand-light);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.tool-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.tool-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Standard Panels & Cards */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-body {
    padding: 18px;
}

.panel-header-simple {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header-simple h2, .panel-header-simple h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
}

.btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-lg {
    padding: 11px 22px;
    font-size: 1rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-group {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-strong);
}

.btn-group .btn {
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--border-strong);
    background: #ffffff;
    color: var(--text-secondary);
}

.btn-group .btn:last-child {
    border-right: none;
}

.btn-group .btn.active, .btn-group .btn:hover {
    background: var(--brand-light);
    color: var(--brand-dark);
}

/* Form Controls */
.form-select, .form-input {
    padding: 7px 12px;
    font-size: 0.88rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}

.form-select:focus, .form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

/* ==========================================================================
   Tuner Specific Styles
   ========================================================================== */
/* Tuner Engine & Gauge Integration */
#tunerframe {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 10px auto;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#tunerback {
    border: 1px solid var(--border);
    margin: 0 auto 10px auto;
    min-height: 150px;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tuneron {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .15s ease;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid var(--brand);
    color: #ffffff;
    background: var(--brand);
    text-decoration: none;
    border-radius: var(--radius-md);
    padding: 10px 28px;
    margin: 8px auto 0 auto;
    width: fit-content;
    min-width: 150px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.tuneron:hover, .tuneron:active {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #ffffff;
}

.tuner-stage {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}

.tuner-meter-container {
    max-width: 440px;
    margin: 0 auto 12px;
    position: relative;
}

.meter-scale-canvas {
    width: 100%;
    max-width: 420px;
    height: 180px;
    display: block;
    margin: 0 auto;
}

.tuner-digital-readout {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    margin-top: -12px;
    margin-bottom: 14px;
}

.detected-note-name {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    font-family: var(--font-mono);
    min-width: 90px;
    letter-spacing: -0.05em;
    transition: color 0.15s ease;
}

.detected-note-name.in-tune {
    color: var(--success);
}

.detected-note-name.flat {
    color: var(--warning);
}

.detected-note-name.sharp {
    color: var(--danger);
}

.tuner-info-pills {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.info-pill {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-pill-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* Headstock and Strings View */
.instrument-headstock-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 18px;
}

.string-selector-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.string-button {
    background: #ffffff;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    min-width: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.string-button:hover {
    border-color: var(--brand);
    background: var(--bg-subtle);
}

.string-button.active {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand-dark);
}

.string-button .string-number {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.string-button .string-pitch {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.string-button .string-hz {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

/* String Display Cards (Display Only - No Audio Playback) */
.string-display-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    user-select: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease;
}

.string-display-card .string-number {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.string-display-card .string-pitch {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--brand);
    line-height: 1.2;
}

.string-display-card .string-hz {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================================================
   Piano Specific Styles
   ========================================================================== */
.piano-keyboard-wrap {
    background: #1e293b;
    border-radius: 0;
    padding: 16px 20px 22px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), var(--shadow-md);
    margin-bottom: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.piano-keys-container {
    position: relative;
    height: clamp(210px, 28vh, 290px);
    display: flex;
    width: 100%;
    min-width: 800px;
    user-select: none;
    margin: 0 auto;
}

.piano-key {
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 8px;
    font-family: var(--font-mono);
    transition: background 0.08s, transform 0.05s;
    user-select: none;
}

.piano-key.white {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 3px 2px rgba(0,0,0,0.15);
    z-index: 1;
    color: #334155;
    font-size: clamp(0.72rem, 1vw, 0.95rem);
    font-weight: 600;
}

.piano-key.white:active, .piano-key.white.active {
    background: #bae6fd;
    transform: translateY(2px);
    box-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.piano-key.black {
    width: clamp(22px, 2.6vw, 38px);
    height: 60%;
    background: #0f172a;
    border-radius: 0 0 4px 4px;
    margin-left: calc(-1 * clamp(22px, 2.6vw, 38px) / 2);
    margin-right: calc(-1 * clamp(22px, 2.6vw, 38px) / 2);
    z-index: 2;
    color: #e2e8f0;
    font-size: clamp(0.62rem, 0.8vw, 0.8rem);
    font-weight: 600;
    box-shadow: 0 4px 5px rgba(0,0,0,0.4);
}

.piano-key.black:active, .piano-key.black.active {
    background: #0284c7;
    transform: translateY(2px);
    box-shadow: 0 2px 2px rgba(0,0,0,0.5);
}

.piano-key .key-hint {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

/* ==========================================================================
   Virtual Drums Styles (Realistic Acoustic Kit Layout)
   ========================================================================== */
.drum-kit-stage {
    background: radial-gradient(ellipse at center, #1e293b 0%, #0f172a 65%, #020617 100%);
    border-radius: 0;
    padding: 30px 20px 36px;
    position: relative;
    margin-bottom: 0;
    box-shadow: inset 0 2px 25px rgba(0, 0, 0, 0.75);
    overflow-x: auto;
    width: 100%;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
    box-sizing: border-box;
    scrollbar-width: thin;
}

.acoustic-drum-set {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(14px, 2.2vw, 32px);
    max-width: 1250px;
    min-width: 740px;
    width: 100%;
    margin: 0 auto;
    align-items: stretch;
    justify-content: center;
}

.drum-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 2.2vw, 28px);
    height: 100%;
}

/* Individual Drum & Cymbal Base */
.drum-pad {
    position: relative;
    user-select: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.08s ease, filter 0.08s ease, box-shadow 0.08s ease;
    -webkit-tap-highlight-color: transparent;
}

/* 1. Realistic Cast Bronze Cymbals (Crash & Ride) */
.cymbal-pad {
    border-radius: 50%;
    aspect-ratio: 1/1;
    background: radial-gradient(circle at 45% 45%,
        #fef08a 0%,
        #fde047 12%,
        #f59e0b 28%,
        #d97706 48%,
        #b45309 68%,
        #78350f 88%,
        #451a03 100%
    );
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65),
                inset 0 0 0 2px rgba(254, 240, 138, 0.5),
                inset 0 0 18px rgba(69, 26, 3, 0.7);
}

.cymbal-grooves {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle,
        transparent 0px,
        transparent 3px,
        rgba(254, 240, 138, 0.18) 4px,
        rgba(69, 26, 3, 0.15) 5px
    );
    pointer-events: none;
}

.cymbal-bell {
    position: absolute;
    width: 28%;
    height: 28%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #fef08a 10%, #d97706 65%, #78350f 100%);
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), inset 0 2px 3px rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cymbal-bell.small {
    width: 22%;
    height: 22%;
}

.cymbal-bell.large {
    width: 32%;
    height: 32%;
}

.cymbal-wingnut {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.pad-crash {
    width: clamp(110px, 12.5vw, 160px);
}

.pad-ride {
    width: clamp(125px, 14vw, 175px);
}

.cymbal-pad:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
}

.cymbal-pad.hit {
    transform: scale(0.96) rotate(2deg);
    filter: brightness(1.25);
    box-shadow: 0 0 28px rgba(250, 204, 21, 0.95);
}

/* 2. Hi-Hat Station (Closed & Open) */
.hihat-station {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1vw, 12px);
    width: 100%;
}

.pad-hihat-closed {
    width: clamp(86px, 9.8vw, 120px);
    z-index: 2;
}

.pad-hihat-open {
    width: clamp(74px, 8.4vw, 105px);
    background: radial-gradient(circle at 45% 45%,
        #fef08a 0%,
        #facc15 15%,
        #eab308 35%,
        #ca8a04 55%,
        #854d0e 80%,
        #713f12 100%
    );
    box-shadow: 0 8px 18px rgba(0,0,0,0.5), inset 0 0 0 2px rgba(254, 240, 138, 0.35);
}

/* 3. Authentic Coated Drumheads (Snare & Toms) */
.drum-head-pad {
    border-radius: 50%;
    aspect-ratio: 1/1;
    background: radial-gradient(circle at 45% 45%,
        #ffffff 0%,
        #f8fafc 40%,
        #e2e8f0 75%,
        #cbd5e1 100%
    );
    border: 5px solid #94a3b8;
    outline: 2px solid #334155;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6),
                inset 0 2px 8px rgba(255, 255, 255, 0.7),
                inset 0 0 12px rgba(100, 116, 139, 0.35);
}

.drum-shell-rim {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.drum-shell-rim.chrome-rim {
    border: 3px solid #cbd5e1;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.8), 0 2px 4px rgba(0,0,0,0.4);
}

.pad-tom1 {
    width: clamp(96px, 11vw, 135px);
}

.pad-tom2 {
    width: clamp(105px, 12vw, 145px);
}

.pad-snare {
    width: clamp(125px, 14vw, 170px);
}

.pad-floortom {
    width: clamp(125px, 14vw, 170px);
}

.snare-center-dot {
    position: absolute;
    width: 32%;
    height: 32%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px dashed rgba(148, 163, 184, 0.6);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    pointer-events: none;
}

/* Chrome Tuning Lugs */
.drum-lugs {
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    pointer-events: none;
}

.lug {
    position: absolute;
    width: 5px;
    height: 9px;
    background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 50%, #475569 100%);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.lug-1 { top: 0; left: 50%; transform: translateX(-50%); }
.lug-2 { bottom: 0; left: 50%; transform: translateX(-50%); }
.lug-3 { top: 50%; left: 0; transform: translateY(-50%); }
.lug-4 { top: 50%; right: 0; transform: translateY(-50%); }
.lug-5 { top: 14%; left: 14%; transform: rotate(-45deg); }
.lug-6 { top: 14%; right: 14%; transform: rotate(45deg); }
.lug-7 { bottom: 14%; left: 14%; transform: rotate(45deg); }
.lug-8 { bottom: 14%; right: 14%; transform: rotate(-45deg); }

.drum-head-pad:hover {
    box-shadow: 0 0 0 3px #38bdf8, 0 10px 22px rgba(0,0,0,0.6);
    transform: translateY(-2px);
}

.drum-head-pad.hit {
    transform: scale(0.95) translateY(2px);
    filter: brightness(1.15);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.9), 0 0 0 3px #38bdf8;
}

/* 4. Side Stick / Cross-Stick */
.rimshot-pad {
    width: clamp(95px, 10.5vw, 135px);
    height: clamp(34px, 4vh, 42px);
    border-radius: 20px;
    background: linear-gradient(180deg, #64748b 0%, #334155 50%, #1e293b 100%);
    border: 2px solid #94a3b8;
    color: #f8fafc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.08s ease, filter 0.08s ease;
}

.rimshot-bar {
    position: absolute;
    width: 60%;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
    pointer-events: none;
}

.rimshot-pad:hover {
    border-color: #38bdf8;
    filter: brightness(1.15);
}

.rimshot-pad.hit {
    transform: scale(0.95);
    background: #0284c7;
    border-color: #38bdf8;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.85);
}

/* 5. Massive Bass Drum (Kick 22") */
.pad-kick {
    width: clamp(145px, 16.5vw, 210px);
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%,
        #1e293b 0%,
        #0f172a 45%,
        #090d16 85%,
        #020617 100%
    );
    border: 7px solid #334155;
    outline: 3px solid #cbd5e1;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.8),
                inset 0 0 0 2px rgba(255, 255, 255, 0.15),
                inset 0 0 24px rgba(0, 0, 0, 0.9);
}

.kick-wood-hoop {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 3px solid #1c1917;
    pointer-events: none;
}

.kick-head-graphic {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    pointer-events: none;
}

.kick-brand {
    font-size: clamp(0.68rem, 0.85vw, 0.9rem);
    font-weight: 900;
    letter-spacing: 0.18em;
    color: #38bdf8;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.kick-beater-spot {
    width: clamp(32px, 3.6vw, 48px);
    height: clamp(32px, 3.6vw, 48px);
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 2px 6px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.beater-ball {
    width: 44%;
    height: 44%;
    border-radius: 50%;
    background: #0f172a;
    border: 1px solid #38bdf8;
}

.kick-claws {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    pointer-events: none;
}

.claw {
    position: absolute;
    width: 6px;
    height: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 50%, #475569 100%);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.claw-1 { top: 0; left: 50%; transform: translateX(-50%); }
.claw-2 { bottom: 0; left: 50%; transform: translateX(-50%); }
.claw-3 { top: 50%; left: 0; transform: translateY(-50%); }
.claw-4 { top: 50%; right: 0; transform: translateY(-50%); }
.claw-5 { top: 14%; left: 14%; transform: rotate(-45deg); }
.claw-6 { top: 14%; right: 14%; transform: rotate(45deg); }
.claw-7 { bottom: 14%; left: 14%; transform: rotate(45deg); }
.claw-8 { bottom: 14%; right: 14%; transform: rotate(-45deg); }

.pad-kick:hover {
    box-shadow: 0 0 0 3px #38bdf8, 0 14px 30px rgba(0,0,0,0.8);
    transform: translateY(-2px);
}

.pad-kick.hit {
    transform: scale(0.94);
    filter: brightness(1.2);
    box-shadow: 0 0 36px rgba(56, 189, 248, 0.95), 0 0 0 4px #38bdf8;
}

/* 6. Die-Cast Foot Pedals (Hi-Hat & Kick Pedals) */
.pedal-pad {
    width: clamp(68px, 7.5vw, 95px);
    height: clamp(95px, 11vh, 135px);
    border-radius: 8px 8px 14px 14px;
    background: linear-gradient(180deg, #475569 0%, #334155 35%, #1e293b 80%, #0f172a 100%);
    border: 2px solid #64748b;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.08s ease, filter 0.08s ease;
}

.pedal-plate {
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.pedal-treads {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 65%;
    pointer-events: none;
}

.pedal-treads span {
    height: 3px;
    background: #64748b;
    border-radius: 2px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.pedal-pad:hover {
    border-color: #38bdf8;
    filter: brightness(1.15);
}

.pedal-pad.hit {
    transform: perspective(300px) rotateX(15deg) translateY(4px);
    border-color: #38bdf8;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.8);
    background: linear-gradient(180deg, #0284c7 0%, #0c4a6e 100%);
}

/* 7. Hardware Base & Legs for Floor Tom */
.drum-hardware-base {
    width: clamp(80px, 9vw, 110px);
    height: clamp(50px, 6vh, 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.65;
}

.hw-bracket {
    display: flex;
    gap: 16px;
    margin-bottom: 6px;
}

.hw-leg {
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #cbd5e1 0%, #475569 100%);
    border-radius: 2px;
}

.hw-leg-1 { transform: rotate(-20deg); }
.hw-leg-2 { transform: rotate(20deg); }

.hw-badge {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: #94a3b8;
    letter-spacing: 0.1em;
}

/* Pad text & labels */
.pad-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 2;
}

.pad-name {
    font-weight: 800;
    font-size: clamp(0.72rem, 0.88vw, 0.95rem);
    color: #0f172a;
    text-shadow: 0 1px 2px rgba(255,255,255,0.7);
}

.cymbal-pad .pad-name,
.pad-kick .pad-name,
.pedal-pad .pad-name,
.rimshot-pad .pad-name {
    color: #f8fafc;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.pad-key {
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 0.75vw, 0.78rem);
    font-weight: 800;
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 3px;
    letter-spacing: 0.04em;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.pad-kick .pad-key {
    font-size: clamp(0.68rem, 0.82vw, 0.85rem);
    padding: 2px 8px;
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}

/* ==========================================================================
   Virtual Guitar Fretboard & Body Assembly (Authentic Acoustic Guitar)
   ========================================================================== */
.guitar-stage {
    background: #0f172a;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 20px 24px;
    margin-bottom: 0;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.guitar-assembly-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 6px 0 16px;
    display: flex;
    justify-content: center;
}

.guitar-assembly {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 900px;
    height: clamp(250px, 30vh, 320px);
    background: #1e1b18;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 2px solid #3e2723;
    position: relative;
    user-select: none;
}

/* 1. Headstock (Left) */
.guitar-headstock {
    width: 110px;
    background: linear-gradient(135deg, #451a03 0%, #291204 60%, #1c0a02 100%);
    border-radius: 12px 0 0 12px;
    border-right: 4px solid #1c1917;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 8px;
    box-shadow: inset -3px 0 8px rgba(0,0,0,0.6);
    position: relative;
    flex-shrink: 0;
}

.headstock-brand {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #fde047;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    margin-bottom: 4px;
}

.headstock-pegs-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: space-around;
    height: 100%;
}

.guitar-peg-btn {
    background: linear-gradient(180deg, #f8fafc 0%, #94a3b8 100%);
    border: 1px solid #475569;
    border-radius: 6px;
    color: #0f172a;
    padding: 4px 6px;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: all 0.1s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guitar-peg-btn:hover {
    background: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px #38bdf8;
}

.guitar-peg-btn.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 12px #38bdf8;
}

/* 2. Bone Nut */
.guitar-nut {
    width: 14px;
    background: linear-gradient(to right, #fef08a 0%, #fef9c3 40%, #e2e8f0 100%);
    border-right: 3px solid #0a0908;
    box-shadow: 2px 0 8px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

.nut-slot {
    width: 100%;
    height: 3px;
    background: #3e2723;
}

/* 3. Rosewood Fretboard (Center) */
.guitar-fretboard-body {
    flex: 1;
    background: linear-gradient(180deg, #2b170e 0%, #3e2014 45%, #2b170e 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.7);
    padding: 18px 0 10px;
}

/* Fret scale numbering row */
.fret-numbers-row {
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    display: flex;
    pointer-events: none;
    z-index: 4;
}

.fret-num-marker {
    flex: 1;
    text-align: center;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: #94a3b8;
}

/* Mother-of-pearl position inlays (Dots) */
.fret-inlay-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 20%, #e2e8f0 60%, #cbd5e1 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3), 0 0 4px rgba(255,255,255,0.6);
    pointer-events: none;
    z-index: 1;
}

.fret-inlay-dot.double-top {
    top: 32%;
}

.fret-inlay-dot.double-bottom {
    top: 68%;
}

/* Strings tracks */
.guitar-string-track {
    position: relative;
    height: 34px;
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 3;
}

/* Guitar String Wires */
.g-string-wire {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.05s ease;
}

.g-wire-6 {
    height: 5.2px;
    background: repeating-linear-gradient(90deg, #b45309 0px, #d97706 2px, #78350f 4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

.g-wire-5 {
    height: 4.4px;
    background: repeating-linear-gradient(90deg, #b45309 0px, #d97706 2px, #78350f 4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.g-wire-4 {
    height: 3.6px;
    background: repeating-linear-gradient(90deg, #ca8a04 0px, #eab308 2px, #854d0e 4px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.g-wire-3 {
    height: 2.8px;
    background: repeating-linear-gradient(90deg, #ca8a04 0px, #facc15 2px, #854d0e 4px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.g-wire-2 {
    height: 2.2px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 50%, #64748b 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.g-wire-1 {
    height: 1.6px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 60%, #94a3b8 100%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.g-string-wire.string-vibrating {
    animation: guitarStringVibrate 0.12s ease infinite alternate;
}

@keyframes guitarStringVibrate {
    0% { transform: translateY(-2px); }
    100% { transform: translateY(2px); }
}

/* Fret Click Targets */
.g-fret-cells-row {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    position: relative;
    z-index: 4;
}

.g-fret-cell {
    flex: 1;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.1s ease;
    border-right: 2px solid #cbd5e1;
}

.g-fret-cell.fret-0 {
    background: rgba(15, 23, 42, 0.4);
    border-right: 3px solid #fef08a;
}

.g-fret-cell:hover {
    background: rgba(56, 189, 248, 0.2);
}

.g-fret-marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #e2e8f0;
    transition: all 0.12s ease;
    user-select: none;
}

.g-fret-cell.active-chord .g-fret-marker {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px #38bdf8 !important;
    transform: scale(1.15);
}

.g-fret-cell.fret-hit .g-fret-marker {
    background: #f59e0b !important;
    border-color: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 0 16px #f59e0b !important;
    transform: scale(1.3);
}

/* 4. Guitar Soundboard & Soundhole (Right) */
.guitar-soundboard {
    width: 150px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 45%, #78350f 100%);
    border-radius: 0 12px 12px 0;
    border-left: 3px solid #291204;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 4px 0 10px rgba(0,0,0,0.5);
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
}

.guitar-soundboard:hover {
    filter: brightness(1.05);
}

/* Soundhole with Abalone/Wood Rosette */
.guitar-soundhole {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, #020617 60%, #0f172a 100%);
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.9), 0 0 0 8px #92400e, 0 0 0 12px #fef08a, 0 0 0 15px #78350f;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.soundhole-label {
    color: #38bdf8;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    pointer-events: none;
}

.guitar-strum-zone {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: transparent;
}

/* ==========================================================================
   Online Xylophone Styles
   ========================================================================== */
.xylophone-stage {
    background: #f8fafc;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 26px 20px;
    margin-bottom: 0;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
}

.xylo-bars-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(6px, 1.2vw, 16px);
    width: 100%;
    min-width: 680px;
    height: clamp(230px, 30vh, 320px);
}

.xylo-bar {
    flex: 1;
    max-width: clamp(44px, 5.5vw, 90px);
    height: 100%;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    transition: transform 0.08s ease, filter 0.08s ease;
    user-select: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
}

.xylo-bar:hover {
    filter: brightness(1.08);
}

.xylo-bar:active, .xylo-bar.hit {
    transform: scale(0.95) translateY(4px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.xylo-bar .bar-pin {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.3);
}

.xylo-bar .bar-note {
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Virtual Violin Styles (Authentic Ebony Fingerboard & Body Assembly)
   ========================================================================== */
.violin-stage {
    background: #0f172a;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 20px 24px;
    margin-bottom: 0;
    box-shadow: inset 0 2px 20px rgba(0,0,0,0.5);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.violin-assembly-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 6px 0 16px;
    display: flex;
    justify-content: center;
}

.violin-assembly {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 860px;
    height: clamp(230px, 28vh, 300px);
    background: #090d16;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    border: 2px solid #334155;
    position: relative;
    user-select: none;
}

/* 1. Pegbox & Scroll (Left) */
.violin-pegbox {
    width: 86px;
    background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
    border-radius: 10px 0 0 10px;
    border-right: 3px solid #1e293b;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 12px 6px;
    box-shadow: inset -3px 0 8px rgba(0,0,0,0.6);
    position: relative;
    flex-shrink: 0;
}

.pegbox-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fde68a;
    text-align: center;
    margin-bottom: 2px;
}

.tuning-peg-btn {
    background: #292524;
    border: 1px solid #78350f;
    border-radius: 6px;
    color: #fde68a;
    padding: 5px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: all 0.1s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tuning-peg-btn:hover {
    background: #44403c;
    border-color: #f59e0b;
    color: #ffffff;
}

.tuning-peg-btn.active {
    background: #b45309;
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 12px #f59e0b;
}

/* 2. Bone Nut */
.violin-nut {
    width: 14px;
    background: linear-gradient(to right, #fef08a 0%, #fef9c3 50%, #e2e8f0 100%);
    border-right: 2px solid #020617;
    box-shadow: 2px 0 6px rgba(0,0,0,0.7);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-shrink: 0;
}

.nut-groove {
    width: 100%;
    height: 3px;
    background: #78350f;
}

/* 3. Ebony Fingerboard (Center) */
.violin-fingerboard-body {
    flex: 1;
    background: linear-gradient(180deg, #111827 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.8);
}

/* Classical Finger Tape Lines */
.violin-tape-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(254, 240, 138, 0.45);
    box-shadow: 0 0 4px rgba(254, 240, 138, 0.3);
    pointer-events: none;
    z-index: 1;
}

.violin-tape-name {
    position: absolute;
    bottom: -22px;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
    text-transform: uppercase;
}

/* String Tracks */
.violin-string-track {
    position: relative;
    height: 38px;
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 2;
}

/* Real String Wires */
.v-string-wire {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.05s ease;
}

.v-string-wire.wire-g {
    height: 5px;
    background: linear-gradient(180deg, #ca8a04 0%, #eab308 50%, #854d0e 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.v-string-wire.wire-d {
    height: 4px;
    background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 50%, #64748b 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.v-string-wire.wire-a {
    height: 3px;
    background: linear-gradient(180deg, #cbd5e1 0%, #f1f5f9 50%, #94a3b8 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.v-string-wire.wire-e {
    height: 2px;
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 50%, #cbd5e1 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.v-string-wire.vibrating {
    animation: stringVibrate 0.1s ease infinite alternate;
}

@keyframes stringVibrate {
    0% { transform: translateY(-1.5px); }
    100% { transform: translateY(1.5px); }
}

/* Interactive Note Spots along Fingerboard */
.v-notes-row {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    position: relative;
    z-index: 2;
}

.v-note-spot {
    flex: 1;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.1s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.v-note-spot:hover .spot-dot {
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
    transform: scale(1.2);
}

.spot-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #e2e8f0;
    transition: all 0.1s ease;
    user-select: none;
}

.v-note-spot.active .spot-dot {
    background: #38bdf8 !important;
    border-color: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 0 14px #38bdf8 !important;
    transform: scale(1.3);
}

/* 4. Maple Bridge & Body Flank (Right) */
.violin-bridge-body {
    width: 90px;
    background: linear-gradient(135deg, #78350f 0%, #92400e 40%, #451a03 100%);
    border-radius: 0 10px 10px 0;
    border-left: 4px solid #1e293b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 8px;
    box-shadow: inset 4px 0 8px rgba(0,0,0,0.5);
    position: relative;
    user-select: none;
    flex-shrink: 0;
}

.violin-maple-bridge {
    width: 18px;
    height: 80%;
    background: #fef08a;
    border: 1px solid #ca8a04;
    border-radius: 4px;
    box-shadow: -2px 0 6px rgba(0,0,0,0.5);
    position: relative;
}

.violin-fhole-accent {
    position: absolute;
    font-family: serif;
    font-size: 2.4rem;
    font-style: italic;
    color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    right: 8px;
}

/* ==========================================================================
   Tools: Metronome, Oscillators, Circle of Fifths, etc.
   ========================================================================== */
.metronome-visual {
    text-align: center;
    padding: 20px 0;
}

.metronome-pendulum-box {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.metronome-beat-ring {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    background: var(--bg-accent-soft);
    border: 2px solid var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--brand-dark);
    font-family: var(--font-mono);
    transition: transform 0.05s ease, background 0.05s ease;
}

.metronome-beat-ring.pulse {
    transform: scale(1.15);
    background: var(--brand);
    color: #ffffff;
}

.metronome-beat-ring.accent-pulse {
    transform: scale(1.22);
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.metronome-bpm-display {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.metronome-tempo-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.beat-dots-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.beat-dot {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    background: var(--border-strong);
    transition: background 0.1s ease;
}

.beat-dot.active {
    background: var(--brand);
}

.beat-dot.accent.active {
    background: var(--danger);
}

/* Circle of Fifths */
.circle-svg-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.circle-key-sector {
    cursor: pointer;
    transition: fill 0.15s ease, opacity 0.15s ease;
}

.circle-key-sector:hover {
    opacity: 0.85;
}

/* Sliders */
.range-slider {
    width: 100%;
    height: 6px;
    background: var(--border-strong);
    border-radius: var(--radius-full);
    outline: none;
    -webkit-appearance: none;
    margin: 12px 0;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--brand);
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Grid for Tools List / Home */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.tool-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--brand-light);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.tool-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tool-card-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.tool-card-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

/* ==========================================================================
   Article Placeholder Section (Reserved for future content)
   ========================================================================== */
/* Editorial & Guide Content Styling */
.article-editorial-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    margin-top: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.article-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    background: var(--brand-light);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}

.article-main-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 10px;
}

.article-subtitle {
    font-size: 0.96rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.article-body h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 28px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle, #f1f5f9);
    padding-bottom: 6px;
}

.article-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
}

.article-body p {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 14px;
}

.article-body ul, .article-body ol {
    margin: 10px 0 16px 20px;
    padding: 0;
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.7;
}

.article-body li {
    margin-bottom: 6px;
}

.article-callout {
    background: #f0f9ff;
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin: 18px 0;
    color: #0c4a6e;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-callout strong {
    color: #0369a1;
}

.article-table-wrap {
    overflow-x: auto;
    margin: 16px 0 20px 0;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.article-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 14px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: #334155;
}

.article-table tr:nth-child(even) {
    background: #fafbfc;
}

/* FAQ Accordion / Cards */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.faq-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    background: #ffffff;
    transition: border-color 0.15s ease;
}

.faq-card:hover {
    border-color: var(--border-strong);
}

.faq-q {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-q span.q-badge {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
}

.faq-a {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.6;
}

.placeholder-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    background: var(--brand-light);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.placeholder-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.placeholder-lead {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.placeholder-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.placeholder-box {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 14px;
    background: #fafbfc;
}

.placeholder-box-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.placeholder-box-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 32px 0 24px;
    margin-top: auto;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.footer-col-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.footer-links-list {
    list-style: none;
}

.footer-links-list li {
    margin-bottom: 6px;
}

.footer-links-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    transition: color 0.15s;
}

.footer-links-list a:hover {
    color: var(--brand);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 680px) {
    .header-inner {
        height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
        gap: 8px;
    }
    .footer-nav-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .placeholder-blocks {
        grid-template-columns: 1fr;
    }
    .tuner-digital-readout {
        gap: 8px;
    }
    .detected-note-name {
        font-size: 2.8rem;
    }
    .acoustic-drum-set {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px 6px;
    }
    .pad-crash, .pad-ride {
        width: 72px;
    }
    .pad-tom1, .pad-tom2 {
        width: 66px;
    }
    .pad-hihat-closed, .pad-floortom, .pad-snare {
        width: 72px;
    }
    .pad-hihat-open {
        width: 62px;
    }
    .pad-kick {
        width: 96px;
        height: 96px;
    }
    .pedal-pad {
        width: 50px;
        height: 70px;
    }
    .pad-name {
        font-size: 0.7rem;
    }
    .pad-key {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}

/* ==========================================================================
   Virtual Instruments Recording Bar & Fullscreen Adaptive Styles
   ========================================================================== */
.recording-result-bar {
    display: none;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 14px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.recording-pulse {
    animation: pulseRecord 1.2s infinite;
}

@keyframes pulseRecord {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==========================================================================
   Virtual Instruments Main Stage (Edge-to-Edge 100vw Full-Bleed Display)
   Spans from the very left edge of the screen to the very right edge.
   ========================================================================== */
.instrument-stage {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
    padding: 0;
    margin-top: 14px;
    margin-bottom: 22px;
}

/* ==========================================================================
   Adaptive Fullscreen Mode (Scales all instruments to the maximum screen size)
   ========================================================================== */
.instrument-stage:fullscreen,
.instrument-stage:-webkit-full-screen,
.instrument-stage.in-fullscreen,
.instrument-stage.is-fullscreen-fallback {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    background: #090d16 !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 18px 18px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Fullscreen Top HUD Controls */
.instrument-stage:fullscreen .fs-hud-bar,
.instrument-stage:-webkit-full-screen .fs-hud-bar,
.instrument-stage.in-fullscreen .fs-hud-bar,
.instrument-stage.is-fullscreen-fallback .fs-hud-bar {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    color: #ffffff !important;
    margin-bottom: 8px !important;
    padding: 0 6px !important;
    flex-shrink: 0 !important;
}

/* Fullscreen Horizontal Adaptations (Adaptive Maximum Scaling) */
/* 1. Piano in Fullscreen */
.instrument-stage:fullscreen .piano-keyboard-wrap,
.instrument-stage:-webkit-full-screen .piano-keyboard-wrap,
.instrument-stage.in-fullscreen .piano-keyboard-wrap,
.instrument-stage.is-fullscreen-fallback .piano-keyboard-wrap {
    width: 100% !important;
    max-width: none !important;
    height: calc(100vh - 65px) !important;
    max-height: calc(100vh - 65px) !important;
    flex: 1 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: 10px 16px 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.instrument-stage:fullscreen .piano-keys-container,
.instrument-stage:-webkit-full-screen .piano-keys-container,
.instrument-stage.in-fullscreen .piano-keys-container,
.instrument-stage.is-fullscreen-fallback .piano-keys-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-width: 900px !important;
    display: flex !important;
}

.instrument-stage:fullscreen .piano-key.white,
.instrument-stage:-webkit-full-screen .piano-key.white,
.instrument-stage.in-fullscreen .piano-key.white,
.instrument-stage.is-fullscreen-fallback .piano-key.white {
    flex: 1 !important;
    min-width: 0 !important;
    height: 100% !important;
    font-size: clamp(0.95rem, 1.4vw, 1.45rem) !important;
    border-radius: 0 0 8px 8px !important;
    padding-bottom: 18px !important;
}

.instrument-stage:fullscreen .piano-key.black,
.instrument-stage:-webkit-full-screen .piano-key.black,
.instrument-stage.in-fullscreen .piano-key.black,
.instrument-stage.is-fullscreen-fallback .piano-key.black {
    height: 60% !important;
    width: clamp(30px, 3.4vw, 56px) !important;
    margin-left: calc(-1 * clamp(30px, 3.4vw, 56px) / 2) !important;
    margin-right: calc(-1 * clamp(30px, 3.4vw, 56px) / 2) !important;
    font-size: clamp(0.8rem, 1.05vw, 1.15rem) !important;
    border-radius: 0 0 6px 6px !important;
    padding-bottom: 14px !important;
}

/* 2. Guitar in Fullscreen */
.instrument-stage:fullscreen .guitar-stage,
.instrument-stage:-webkit-full-screen .guitar-stage,
.instrument-stage.in-fullscreen .guitar-stage,
.instrument-stage.is-fullscreen-fallback .guitar-stage {
    width: 100% !important;
    max-width: none !important;
    height: calc(100vh - 65px) !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.instrument-stage:fullscreen .guitar-assembly-wrapper,
.instrument-stage:-webkit-full-screen .guitar-assembly-wrapper,
.instrument-stage.in-fullscreen .guitar-assembly-wrapper,
.instrument-stage.is-fullscreen-fallback .guitar-assembly-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.instrument-stage:fullscreen .guitar-assembly,
.instrument-stage:-webkit-full-screen .guitar-assembly,
.instrument-stage.in-fullscreen .guitar-assembly,
.instrument-stage.is-fullscreen-fallback .guitar-assembly {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 1000px !important;
    height: clamp(360px, calc(100vh - 85px), 760px) !important;
    border-radius: 18px !important;
}

.instrument-stage:fullscreen .guitar-headstock,
.instrument-stage:-webkit-full-screen .guitar-headstock,
.instrument-stage.in-fullscreen .guitar-headstock,
.instrument-stage.is-fullscreen-fallback .guitar-headstock {
    width: clamp(120px, 12vw, 180px) !important;
}

.instrument-stage:fullscreen .guitar-soundboard-body,
.instrument-stage:-webkit-full-screen .guitar-soundboard-body,
.instrument-stage.in-fullscreen .guitar-soundboard-body,
.instrument-stage.is-fullscreen-fallback .guitar-soundboard-body {
    width: clamp(180px, 18vw, 300px) !important;
}

.instrument-stage:fullscreen .g-soundhole,
.instrument-stage:-webkit-full-screen .g-soundhole,
.instrument-stage.in-fullscreen .g-soundhole,
.instrument-stage.is-fullscreen-fallback .g-soundhole {
    width: clamp(120px, 12vw, 190px) !important;
    height: clamp(120px, 12vw, 190px) !important;
}

.instrument-stage:fullscreen .guitar-string-track,
.instrument-stage:-webkit-full-screen .guitar-string-track,
.instrument-stage.in-fullscreen .guitar-string-track,
.instrument-stage.is-fullscreen-fallback .guitar-string-track {
    height: calc(100% / 6) !important;
}

.instrument-stage:fullscreen .g-fret-cell,
.instrument-stage:-webkit-full-screen .g-fret-cell,
.instrument-stage.in-fullscreen .g-fret-cell,
.instrument-stage.is-fullscreen-fallback .g-fret-cell {
    height: 100% !important;
}

.instrument-stage:fullscreen .g-fret-marker,
.instrument-stage:-webkit-full-screen .g-fret-marker,
.instrument-stage.in-fullscreen .g-fret-marker,
.instrument-stage.is-fullscreen-fallback .g-fret-marker {
    width: clamp(30px, 2.6vw, 48px) !important;
    height: clamp(30px, 2.6vw, 48px) !important;
    font-size: clamp(0.9rem, 1.1vw, 1.25rem) !important;
}

.instrument-stage:fullscreen .guitar-peg-btn,
.instrument-stage:-webkit-full-screen .guitar-peg-btn,
.instrument-stage.in-fullscreen .guitar-peg-btn,
.instrument-stage.is-fullscreen-fallback .guitar-peg-btn {
    height: clamp(36px, 4.5vh, 56px) !important;
    font-size: clamp(0.85rem, 1vw, 1.05rem) !important;
}

/* 3. Drums in Fullscreen */
.instrument-stage:fullscreen .drum-kit-stage,
.instrument-stage:-webkit-full-screen .drum-kit-stage,
.instrument-stage.in-fullscreen .drum-kit-stage,
.instrument-stage.is-fullscreen-fallback .drum-kit-stage {
    width: 100% !important;
    max-width: none !important;
    height: calc(100vh - 65px) !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.instrument-stage:fullscreen .acoustic-drum-set,
.instrument-stage:-webkit-full-screen .acoustic-drum-set,
.instrument-stage.in-fullscreen .acoustic-drum-set,
.instrument-stage.is-fullscreen-fallback .acoustic-drum-set {
    width: 100% !important;
    max-width: 1600px !important;
    height: 100% !important;
    max-height: calc(100vh - 85px) !important;
    gap: clamp(14px, 2.2vw, 38px) !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

.instrument-stage:fullscreen .drum-col,
.instrument-stage:-webkit-full-screen .drum-col,
.instrument-stage.in-fullscreen .drum-col,
.instrument-stage.is-fullscreen-fallback .drum-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
}

.instrument-stage:fullscreen .pad-crash,
.instrument-stage:-webkit-full-screen .pad-crash,
.instrument-stage.in-fullscreen .pad-crash,
.instrument-stage.is-fullscreen-fallback .pad-crash,
.instrument-stage:fullscreen .pad-ride,
.instrument-stage:-webkit-full-screen .pad-ride,
.instrument-stage.in-fullscreen .pad-ride,
.instrument-stage.is-fullscreen-fallback .pad-ride {
    width: clamp(130px, 15vw, 210px) !important;
    height: clamp(130px, 15vw, 210px) !important;
}

.instrument-stage:fullscreen .pad-tom1,
.instrument-stage:-webkit-full-screen .pad-tom1,
.instrument-stage.in-fullscreen .pad-tom1,
.instrument-stage.is-fullscreen-fallback .pad-tom1,
.instrument-stage:fullscreen .pad-tom2,
.instrument-stage:-webkit-full-screen .pad-tom2,
.instrument-stage.in-fullscreen .pad-tom2,
.instrument-stage.is-fullscreen-fallback .pad-tom2 {
    width: clamp(115px, 13vw, 185px) !important;
    height: clamp(115px, 13vw, 185px) !important;
}

.instrument-stage:fullscreen .pad-snare,
.instrument-stage:-webkit-full-screen .pad-snare,
.instrument-stage.in-fullscreen .pad-snare,
.instrument-stage.is-fullscreen-fallback .pad-snare,
.instrument-stage:fullscreen .pad-floortom,
.instrument-stage:-webkit-full-screen .pad-floortom,
.instrument-stage.in-fullscreen .pad-floortom,
.instrument-stage.is-fullscreen-fallback .pad-floortom {
    width: clamp(125px, 14vw, 200px) !important;
    height: clamp(125px, 14vw, 200px) !important;
}

.instrument-stage:fullscreen .pad-hihat-closed,
.instrument-stage:-webkit-full-screen .pad-hihat-closed,
.instrument-stage.in-fullscreen .pad-hihat-closed,
.instrument-stage.is-fullscreen-fallback .pad-hihat-closed {
    width: clamp(105px, 12vw, 160px) !important;
    height: clamp(105px, 12vw, 160px) !important;
}

.instrument-stage:fullscreen .pad-hihat-open,
.instrument-stage:-webkit-full-screen .pad-hihat-open,
.instrument-stage.in-fullscreen .pad-hihat-open,
.instrument-stage.is-fullscreen-fallback .pad-hihat-open {
    width: clamp(92px, 10.5vw, 140px) !important;
    height: clamp(92px, 10.5vw, 140px) !important;
}

.instrument-stage:fullscreen .rimshot-pad,
.instrument-stage:-webkit-full-screen .rimshot-pad,
.instrument-stage.in-fullscreen .rimshot-pad,
.instrument-stage.is-fullscreen-fallback .rimshot-pad {
    width: clamp(110px, 12vw, 160px) !important;
    height: clamp(40px, 4.8vh, 50px) !important;
}

.instrument-stage:fullscreen .pad-kick,
.instrument-stage:-webkit-full-screen .pad-kick,
.instrument-stage.in-fullscreen .pad-kick,
.instrument-stage.is-fullscreen-fallback .pad-kick {
    width: clamp(160px, 18vw, 260px) !important;
    height: clamp(160px, 18vw, 260px) !important;
}

.instrument-stage:fullscreen .pedal-pad,
.instrument-stage:-webkit-full-screen .pedal-pad,
.instrument-stage.in-fullscreen .pedal-pad,
.instrument-stage.is-fullscreen-fallback .pedal-pad {
    width: clamp(80px, 8.5vw, 120px) !important;
    height: clamp(110px, 12vw, 170px) !important;
}

.instrument-stage:fullscreen .pad-name,
.instrument-stage:-webkit-full-screen .pad-name,
.instrument-stage.in-fullscreen .pad-name,
.instrument-stage.is-fullscreen-fallback .pad-name {
    font-size: clamp(0.85rem, 1.1vw, 1.15rem) !important;
}

.instrument-stage:fullscreen .pad-key,
.instrument-stage:-webkit-full-screen .pad-key,
.instrument-stage.in-fullscreen .pad-key,
.instrument-stage.is-fullscreen-fallback .pad-key {
    font-size: clamp(0.78rem, 1vw, 1.05rem) !important;
}

/* 4. Xylophone in Fullscreen */
.instrument-stage:fullscreen .xylophone-stage,
.instrument-stage:-webkit-full-screen .xylophone-stage,
.instrument-stage.in-fullscreen .xylophone-stage,
.instrument-stage.is-fullscreen-fallback .xylophone-stage {
    width: 100% !important;
    max-width: none !important;
    height: calc(100vh - 65px) !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.instrument-stage:fullscreen .xylo-bars-container,
.instrument-stage:-webkit-full-screen .xylo-bars-container,
.instrument-stage.in-fullscreen .xylo-bars-container,
.instrument-stage.is-fullscreen-fallback .xylo-bars-container {
    width: 100% !important;
    max-width: 100% !important;
    height: clamp(360px, calc(100vh - 85px), 760px) !important;
    gap: clamp(8px, 1.5vw, 26px) !important;
}

.instrument-stage:fullscreen .xylo-bar,
.instrument-stage:-webkit-full-screen .xylo-bar,
.instrument-stage.in-fullscreen .xylo-bar,
.instrument-stage.is-fullscreen-fallback .xylo-bar {
    flex: 1 !important;
    max-width: clamp(60px, 6.4vw, 125px) !important;
    border-radius: 10px !important;
    padding: 22px 0 !important;
}

.instrument-stage:fullscreen .xylo-bar .bar-note,
.instrument-stage:-webkit-full-screen .xylo-bar .bar-note,
.instrument-stage.in-fullscreen .xylo-bar .bar-note,
.instrument-stage.is-fullscreen-fallback .xylo-bar .bar-note {
    font-size: clamp(1.1rem, 1.5vw, 1.6rem) !important;
}

.instrument-stage:fullscreen .xylo-bar .bar-pin,
.instrument-stage:-webkit-full-screen .xylo-bar .bar-pin,
.instrument-stage.in-fullscreen .xylo-bar .bar-pin,
.instrument-stage.is-fullscreen-fallback .xylo-bar .bar-pin {
    width: 12px !important;
    height: 12px !important;
}

/* 5. Violin in Fullscreen */
.instrument-stage:fullscreen .violin-stage,
.instrument-stage:-webkit-full-screen .violin-stage,
.instrument-stage.in-fullscreen .violin-stage,
.instrument-stage.is-fullscreen-fallback .violin-stage {
    width: 100% !important;
    max-width: none !important;
    height: calc(100vh - 65px) !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.instrument-stage:fullscreen .violin-assembly-wrapper,
.instrument-stage:-webkit-full-screen .violin-assembly-wrapper,
.instrument-stage.in-fullscreen .violin-assembly-wrapper,
.instrument-stage.is-fullscreen-fallback .violin-assembly-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.instrument-stage:fullscreen .violin-assembly,
.instrument-stage:-webkit-full-screen .violin-assembly,
.instrument-stage.in-fullscreen .violin-assembly,
.instrument-stage.is-fullscreen-fallback .violin-assembly {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 950px !important;
    height: clamp(340px, calc(100vh - 85px), 700px) !important;
    border-radius: 18px !important;
}

.instrument-stage:fullscreen .violin-string-track,
.instrument-stage:-webkit-full-screen .violin-string-track,
.instrument-stage.in-fullscreen .violin-string-track,
.instrument-stage.is-fullscreen-fallback .violin-string-track {
    height: calc(100% / 4) !important;
}

.instrument-stage:fullscreen .v-note-spot,
.instrument-stage:-webkit-full-screen .v-note-spot,
.instrument-stage.in-fullscreen .v-note-spot,
.instrument-stage.is-fullscreen-fallback .v-note-spot {
    height: 100% !important;
}

.instrument-stage:fullscreen .spot-dot,
.instrument-stage:-webkit-full-screen .spot-dot,
.instrument-stage.in-fullscreen .spot-dot,
.instrument-stage.is-fullscreen-fallback .spot-dot {
    width: clamp(38px, 3.8vw, 60px) !important;
    height: clamp(38px, 3.8vw, 60px) !important;
    font-size: clamp(0.95rem, 1.3vw, 1.35rem) !important;
}

.instrument-stage:fullscreen .violin-pegbox,
.instrument-stage:-webkit-full-screen .violin-pegbox,
.instrument-stage.in-fullscreen .violin-pegbox,
.instrument-stage.is-fullscreen-fallback .violin-pegbox {
    width: clamp(100px, 11vw, 170px) !important;
}

.instrument-stage:fullscreen .violin-bridge-body,
.instrument-stage:-webkit-full-screen .violin-bridge-body,
.instrument-stage.in-fullscreen .violin-bridge-body,
.instrument-stage.is-fullscreen-fallback .violin-bridge-body {
    width: clamp(100px, 11vw, 170px) !important;
}

.instrument-stage:fullscreen .tuning-peg-btn,
.instrument-stage:-webkit-full-screen .tuning-peg-btn,
.instrument-stage.in-fullscreen .tuning-peg-btn,
.instrument-stage.is-fullscreen-fallback .tuning-peg-btn {
    height: clamp(36px, 4.5vh, 56px) !important;
    font-size: clamp(0.85rem, 1vw, 1.05rem) !important;
}

/* ==========================================================================
   Forced Auto-Landscape Mode (When in portrait screen/device during fullscreen)
   ========================================================================== */
.instrument-stage.force-landscape {
    position: fixed !important;
    top: 0 !important;
    left: 100vw !important;
    width: 100vh !important;
    height: 100vw !important;
    max-width: none !important;
    max-height: none !important;
    transform: rotate(90deg) !important;
    transform-origin: 0 0 !important;
    z-index: 999999 !important;
    background: #090d16 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin: 0 !important;
}

.instrument-stage.force-landscape .fs-hud-bar {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 4px !important;
    padding: 0 4px !important;
    flex-shrink: 0 !important;
}

/* 1. Piano inside force-landscape */
.instrument-stage.force-landscape .piano-keyboard-wrap {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vw - 55px) !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.instrument-stage.force-landscape .piano-keys-container {
    width: 100% !important;
    height: 100% !important;
    min-width: 750px !important;
}

.instrument-stage.force-landscape .piano-key.white {
    height: 100% !important;
    font-size: 0.85rem !important;
}

.instrument-stage.force-landscape .piano-key.black {
    height: 60% !important;
    font-size: 0.72rem !important;
}

/* 2. Guitar inside force-landscape */
.instrument-stage.force-landscape .guitar-stage {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vw - 55px) !important;
    margin: auto 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.instrument-stage.force-landscape .guitar-assembly-wrapper {
    width: 100% !important;
    padding: 0 !important;
}

.instrument-stage.force-landscape .guitar-assembly {
    min-width: 860px !important;
    height: 240px !important;
}

.instrument-stage.force-landscape .guitar-string-track {
    height: 36px !important;
}

.instrument-stage.force-landscape .g-fret-cell {
    height: 32px !important;
}

.instrument-stage.force-landscape .g-fret-marker {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.7rem !important;
}

/* 3. Drums inside force-landscape */
.instrument-stage.force-landscape .drum-kit-stage {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vw - 55px) !important;
    margin: auto 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.instrument-stage.force-landscape .acoustic-drum-set {
    grid-template-columns: repeat(4, 1fr) !important;
    max-width: 100% !important;
    gap: 6px 12px !important;
    min-width: 0 !important;
}

.instrument-stage.force-landscape .drum-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.instrument-stage.force-landscape .pad-crash,
.instrument-stage.force-landscape .pad-ride {
    width: 78px !important;
}

.instrument-stage.force-landscape .pad-tom1,
.instrument-stage.force-landscape .pad-tom2 {
    width: 70px !important;
}

.instrument-stage.force-landscape .pad-hihat-closed,
.instrument-stage.force-landscape .pad-floortom,
.instrument-stage.force-landscape .pad-snare {
    width: 76px !important;
}

.instrument-stage.force-landscape .pad-hihat-open {
    width: 62px !important;
}

.instrument-stage.force-landscape .rimshot-pad {
    width: 70px !important;
    height: 28px !important;
}

.instrument-stage.force-landscape .pad-kick {
    width: 95px !important;
    height: 95px !important;
}

.instrument-stage.force-landscape .pedal-pad {
    width: 48px !important;
    height: 68px !important;
}

/* 4. Xylophone inside force-landscape */
.instrument-stage.force-landscape .xylophone-stage {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vw - 55px) !important;
    margin: auto 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
}

.instrument-stage.force-landscape .xylo-bars-container {
    width: 100% !important;
    height: 100% !important;
    min-width: 650px !important;
    gap: 6px !important;
}

.instrument-stage.force-landscape .xylo-bar {
    width: 44px !important;
}

/* 5. Violin inside force-landscape */
.instrument-stage.force-landscape .violin-stage {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vw - 55px) !important;
    margin: auto 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.instrument-stage.force-landscape .violin-assembly-wrapper {
    width: 100% !important;
    padding: 0 !important;
}

.instrument-stage.force-landscape .violin-assembly {
    min-width: 740px !important;
    height: 220px !important;
}

.instrument-stage.force-landscape .violin-string-track {
    height: 42px !important;
}

.instrument-stage.force-landscape .v-note-spot {
    height: 38px !important;
}

.instrument-stage.force-landscape .spot-dot {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.72rem !important;
}


/* Footer Language Switcher */
.footer-lang-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 1.5rem 0 1rem;
    font-size: 0.88rem;
    flex-wrap: wrap;
}
.lang-switch-btn {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.15s ease;
}
.lang-switch-btn:hover {
    color: var(--brand);
    background: var(--brand-light);
}
.lang-switch-btn.active {
    color: var(--brand);
    font-weight: 700;
    background: var(--brand-light);
}
