/* controls.css — 다이얼, 노브, 스위치, 버튼 및 리듬 슬라이더 스타일링 */

/* 다이얼 가로 정렬 */
.dials-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}

.dial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.dial-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

/* 원형 다이얼 */
.dial {
    width: var(--dial-size);
    height: var(--dial-size);
    border-radius: 50%;
    background: linear-gradient(145deg, #2b2b2b 0%, #151515 100%);
    border: 2px solid var(--border-control);
    box-shadow: var(--shadow-knob);
    position: relative;
    cursor: grab;
    user-select: none;
    touch-action: none; /* 브라우저 뷰포트 스크롤 방지 */
}

.dial:active {
    cursor: grabbing;
}

/* 다이얼 중앙 미세 원 */
.dial-inner {
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, #202020 0%, #101010 100%);
    border: 1px solid rgba(0, 0, 0, 0.4);
    position: absolute;
    top: 20%;
    left: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.dial-center-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-lcd);
}

/* 다이얼 회전용 래퍼 */
.dial-rotator, .knob-rotator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    pointer-events: none;
    transition: transform 0.05s linear; /* 미세한 움직임 보정 */
}

/* 다이얼 인디케이터 점 */
.dial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    box-shadow: 0 0 6px var(--accent-primary-glow);
    position: absolute;
    top: 10%;
    left: calc(50% - 4px);
    pointer-events: none;
}

/* 다이얼용 수직 가이드 바 */
.dial-vbar {
    position: absolute;
    right: -14px;
    top: calc(50% - 30px);
    width: 5px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.dial-vbar.visible {
    opacity: 1;
}

.dial-vbar-fill {
    width: 100%;
    background: linear-gradient(0deg, var(--accent-primary), #ffaa44);
    position: absolute;
    bottom: 0;
    left: 0;
    height: 50%; /* JS에서 동적 조정 */
}

/* 모드 토글 스위치 행 */
.mode-switch-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.mode-switch {
    width: 170px;
    height: 34px;
    background-color: #0d0d0d;
    border-radius: 17px;
    border: 1px solid var(--border-subtle);
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
}

.mode-switch-thumb {
    width: 82px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #d84315 100%);
    border-radius: 14px;
    position: absolute;
    left: 2px;
    transition: left 0.25s var(--ease-spring);
    box-shadow: 0 2px 6px var(--accent-primary-glow);
}

.mode-switch.advanced .mode-switch-thumb {
    left: 84px;
}

.mode-switch-label {
    flex: 1;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    z-index: 2;
    pointer-events: none;
    transition: color 0.2s ease;
    text-transform: uppercase;
}

.mode-switch-label.active {
    color: #fff;
}

/* 하위 모드 가로 컨테이너 */
.sub-modes-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.mode-btn {
    flex: 1;
    max-width: 80px;
    padding: 8px 0;
    border-radius: 8px;
    background: var(--bg-control);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: rgba(255, 102, 68, 0.12);
    border-color: var(--border-active);
    color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(255, 102, 68, 0.1);
}

/* 기능 버튼들 (BEAT, VOICE) */
.button-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.action-btn {
    flex: 1;
    max-width: 120px;
    padding: 10px 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #333 0%, #222 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
}

.action-btn:active {
    background: #1c1c1c;
    box-shadow: var(--shadow-pressed);
    transform: translateY(1px);
}

.action-btn.active {
    background: rgba(255, 102, 68, 0.15) !important;
    border-color: var(--border-active) !important;
    color: var(--accent-primary) !important;
    box-shadow: 0 0 10px rgba(255, 102, 68, 0.15) !important;
}

/* 리듬 포인트 슬라이더 섹션 (P1~P6) */
.rhythm-switch-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 8px;
}

.rhythm-slider-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 4px;
}

.rhythm-slider-label {
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--text-muted);
}

/* 수직 슬라이더 스타일 */
.rhythm-slider-wrapper {
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.rhythm-slider {
    -webkit-appearance: none;
    appearance: none;
    transform: rotate(-90deg);
    width: 60px;
    height: 4px;
    background: #252525;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.rhythm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 1.5px solid #111;
}

.rhythm-slider-col.enabled .rhythm-slider::-webkit-slider-thumb {
    background: var(--accent-primary);
}

.rhythm-slider-symbol {
    font-size: 0.75rem;
    font-weight: bold;
    height: 14px;
    color: var(--text-main);
}

.rhythm-slider-col.disabled {
    opacity: 0.25;
}

/* ZONE D: 볼륨 노브 개별 컨테이너 */
.knob-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.knob {
    width: var(--knob-size);
    height: var(--knob-size);
    border-radius: 50%;
    background: linear-gradient(145deg, #303030 0%, #171717 100%);
    border: 1.5px solid var(--border-control);
    box-shadow: var(--shadow-knob);
    position: relative;
    cursor: grab;
    touch-action: none;
}

.knob:active {
    cursor: grabbing;
}

.knob-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-secondary);
    position: absolute;
    top: 8%;
    left: calc(50% - 3px);
    pointer-events: none;
}

.knob-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ZONE E: 액션 버튼들 */
.control-btn {
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--bg-control);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:active {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(1px);
}

.prog-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prog-btns .control-btn {
    padding: 6px 14px;
    font-size: 0.65rem;
}

/* START/TAP 대형 메인 액션 버튼 */
.btn-start-tap {
    flex: 1.5;
    max-width: 180px;
    height: 52px;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #cc3311 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    border: none;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(255, 102, 68, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.btn-start-tap:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(255, 102, 68, 0.3);
}

.btn-start-tap.playing {
    background: linear-gradient(135deg, #cc3311 0%, #881100 100%);
}

/* Advanced 에디터 패널 공통 스타일 */
.timbre-editor-panel, .variation-editor-panel {
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 8px 12px;
    height: 110px; /* rhythm-switch-section 높이와 매칭 */
    box-sizing: border-box;
    justify-content: center;
}

.timbre-title, .var-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-align: center;
}

/* 1. Timbre 에디터 그리드 */
.timbre-select-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    width: 100%;
}

.timbre-select-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.timbre-select-col label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
}

.timbre-select-col select {
    width: 100%;
    background-color: #202020;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.65rem;
    padding: 3px 2px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    text-align: center;
}

.timbre-select-col select:focus {
    border-color: var(--accent-primary);
}

/* 2. Variation 에디터 리스트 */
.var-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
}

.var-row {
    display: flex;
    align-items: center;
    background-color: #1a1a1a;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 6px;
}

.var-row.active {
    background: rgba(255, 102, 68, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(255, 102, 68, 0.15);
}

.var-name {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.var-row.active .var-name {
    color: var(--accent-primary);
}

.var-enable {
    width: 12px;
    height: 12px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.var-details {
    flex: 1;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

.var-row.active .var-details {
    color: var(--text-main);
}

/* 템포 수평 슬라이더 및 미세 조절 버튼 */
.tempo-slider-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 15px 0;
}

.tempo-slider-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 320px;
    gap: 12px;
}

.tempo-adjust-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    user-select: none;
    touch-action: manipulation;
}

.tempo-adjust-btn:active {
    transform: scale(0.92);
    background: #111;
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
}

#tempo-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #111;
    border: 1px solid var(--border-subtle);
    outline: none;
    cursor: pointer;
}

#tempo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #cc3311 100%);
    box-shadow: 0 0 10px var(--accent-primary-glow);
    border: 2px solid #111;
    cursor: pointer;
    transition: transform 0.1s ease;
}

#tempo-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

/* 모달 레이아웃 (Glassmorphism) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(25, 25, 25, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 320px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-title {
    margin-top: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

#bpm-input {
    width: 100%;
    background: #111;
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-size: 1.5rem;
    text-align: center;
    font-family: var(--font-lcd);
    outline: none;
    margin-bottom: 24px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

#bpm-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
}

#bpm-input::-webkit-outer-spin-button,
#bpm-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#bpm-input[type=number] {
    -moz-appearance: textfield;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.btn-cancel:active {
    background: rgba(255, 255, 255, 0.15);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #cc3311 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 102, 68, 0.2);
}

.btn-confirm:active {
    transform: scale(0.97);
}

/* 퀵 BPM 프리셋 버튼 */
.quick-bpm-group {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.quick-bpm-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-bpm-btn:active, .quick-bpm-btn:focus {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
    border-color: var(--accent-primary);
    transform: scale(0.95);
    outline: none;
}

/* 템포 칩 버튼 */
.tempo-label-chip {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tempo-label-chip:hover {
    background: rgba(255, 102, 68, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(255, 102, 68, 0.2);
}

.tempo-label-chip:active {
    transform: scale(0.95);
    background: rgba(255, 102, 68, 0.2);
}

.tempo-label-chip i {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.tempo-label-chip:hover i {
    color: var(--accent-primary);
}

/* 글로벌 음색 선택기 (< Wood Block > 스타일) */
.timbre-select-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 6px;
    margin: 8px 0;
}

.timbre-label-chip {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin: 0 auto 6px auto;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    outline: none;
}

.timbre-label-chip:hover {
    background: rgba(255, 102, 68, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(255, 102, 68, 0.2);
}

.timbre-label-chip:active {
    transform: scale(0.95);
    background: rgba(255, 102, 68, 0.2);
}

.timbre-label-chip i {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.timbre-label-chip:hover i {
    color: var(--accent-primary);
}

.timbre-selector-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    background: rgba(25, 25, 25, 0.45);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timbre-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.0rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timbre-nav-btn:hover {
    color: var(--accent-primary);
    background: rgba(255, 102, 68, 0.08);
}

.timbre-nav-btn:active {
    transform: scale(0.92);
    background: rgba(255, 102, 68, 0.15);
}

.timbre-display {
    flex: 1;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
    user-select: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* 독립형 TAP 버튼 스타일 */
.btn-tap-direct {
    flex: 1;
    max-width: 90px;
    height: 52px;
    border-radius: 26px;
    background: linear-gradient(135deg, #333 0%, #1e1e1e 100%);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.btn-tap-direct:active {
    transform: scale(0.96);
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 12px var(--accent-primary-glow);
}

/* 8채널 통합 믹서 콘솔 스타일 */
.mixer-section {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    background: rgba(10, 10, 10, 0.45);
    border: 1.5px solid var(--border-subtle);
    border-radius: 16px;
    padding: 10px 4px;
    box-shadow: 
        inset 0 4px 10px rgba(0, 0, 0, 0.6),
        0 8px 20px rgba(0, 0, 0, 0.4);
    margin: 8px 0;
    box-sizing: border-box;
    width: 100%;
}

.mixer-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 6px 1px;
    gap: 6px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-width: 0; /* flex 자식의 overflow 방지 */
}

.mixer-channel:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
}

.mixer-channel-special {
    background: rgba(255, 102, 68, 0.02);
    border-color: rgba(255, 102, 68, 0.08);
}

.mixer-channel-special:hover {
    background: rgba(255, 102, 68, 0.04);
    border-color: rgba(255, 102, 68, 0.12);
}

.mixer-ch-label {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.mixer-channel-special .mixer-ch-label {
    color: var(--accent-primary);
}

.mixer-select-wrapper {
    position: relative;
    width: 95%;
}

.mixer-rhythm-select {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 1px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
}

.mixer-rhythm-select:focus {
    border-color: var(--accent-primary);
}

.mixer-btn-wrapper {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mixer-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.mixer-icon-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.mixer-icon-btn.active {
    color: var(--accent-primary);
    background: rgba(255, 102, 68, 0.1);
    box-shadow: 0 0 6px rgba(255, 102, 68, 0.15);
}

.mixer-static-icon {
    color: var(--accent-primary);
    font-size: 0.8rem;
}

/* 수직 페이더 스타일 */
.mixer-fader-container {
    height: 95px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2px 0;
}

.fader-vertical {
    -webkit-appearance: none;
    appearance: none;
    writing-mode: vertical-lr;
    direction: rtl; /* 슬라이더의 핸들이 아래에서 위로 조작되도록 설정 */
    width: 10px;
    height: 85px;
    background: #ffffff;
    outline: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* 크롬/사파리 수직 슬라이더 썸(손잡이) 스타일 - 파란색 서클 디자인 */
.fader-vertical::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0075ff;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

/* 파이어폭스 수직 슬라이더 썸 스타일 */
.fader-vertical::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0075ff;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

/* 파이어폭스 트랙 배경 투명화 */
.fader-vertical::-moz-range-track {
    background: transparent;
    border: none;
}

.mixer-vol-val {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-lcd);
}

/* 믹서 채널 비활성화: 투명하게 하고 조작은 유지 (드롭다운을 matrix로 제어하므로 락이 걸리지 않음) */
.mixer-channel.disabled {
    opacity: 0.35;
}

/* 기존 드롭다운 래퍼 숨김 */
.mixer-select-wrapper {
    display: none !important;
}

/* ── P1 ~ P6 개별 리듬 선택 트리거 버튼 스타일 ───────────────── */
.mixer-rhythm-trigger {
    width: 90%;
    height: 28px;
    background-color: rgba(30, 30, 30, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    outline: none;
    user-select: none;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.mixer-rhythm-trigger:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(50, 50, 50, 0.85);
}

.mixer-rhythm-trigger:active {
    transform: scale(0.92);
}

/* 각 채널이 무음이 아닐 때 고유 LED 네온 빛 부여 */
#mixer-col-1 .mixer-rhythm-trigger:not(.mute-state) {
    border-color: #ff4444;
    color: #ffffff;
    background: rgba(255, 68, 68, 0.15);
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}
#mixer-col-2 .mixer-rhythm-trigger:not(.mute-state) {
    border-color: #ff9900;
    color: #ffffff;
    background: rgba(255, 153, 0, 0.15);
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.4);
}
#mixer-col-3 .mixer-rhythm-trigger:not(.mute-state) {
    border-color: #ffeb3b;
    color: #ffffff;
    background: rgba(255, 235, 59, 0.15);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.4);
}
#mixer-col-4 .mixer-rhythm-trigger:not(.mute-state) {
    border-color: #4caf50;
    color: #ffffff;
    background: rgba(76, 175, 80, 0.15);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}
#mixer-col-5 .mixer-rhythm-trigger:not(.mute-state) {
    border-color: #2196f3;
    color: #ffffff;
    background: rgba(33, 150, 243, 0.15);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.4);
}
#mixer-col-6 .mixer-rhythm-trigger:not(.mute-state) {
    border-color: #9c27b0;
    color: #ffffff;
    background: rgba(156, 39, 176, 0.15);
    box-shadow: 0 0 8px rgba(156, 39, 176, 0.4);
}

/* ── 리듬 선택 바둑판식 팝업 모달 스타일 ───────────────── */
.rhythm-modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 330px;
    box-sizing: border-box;
    transform: scale(0.9);
    transition: transform 0.25s var(--ease-spring);
}

.modal-overlay:not(.hidden) .rhythm-modal-content {
    transform: scale(1);
}

.rhythm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}

.rhythm-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.rhythm-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.rhythm-modal-close:hover {
    color: #ff4444;
}

/* 4열 바둑판식 리듬 그리드 */
.rhythm-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
}

/* 팝업 내부 개별 리듬 칩 */
.rhythm-modal-chip {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(35, 35, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-sizing: border-box;
}

.rhythm-modal-chip:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(60, 60, 60, 0.85);
}

.rhythm-modal-chip:active {
    transform: scale(0.9);
}

/* 활성화 칩 네온 컬러 (팝업 내부) */
.rhythm-modal-chip.active-p1 {
    background: rgba(255, 68, 68, 0.2) !important;
    border-color: #ff4444 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}
.rhythm-modal-chip.active-p2 {
    background: rgba(255, 153, 0, 0.2) !important;
    border-color: #ff9900 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.5);
}
.rhythm-modal-chip.active-p3 {
    background: rgba(255, 235, 59, 0.2) !important;
    border-color: #ffeb3b !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.5);
}
.rhythm-modal-chip.active-p4 {
    background: rgba(76, 175, 80, 0.2) !important;
    border-color: #4caf50 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}
.rhythm-modal-chip.active-p5 {
    background: rgba(33, 150, 243, 0.2) !important;
    border-color: #2196f3 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}
.rhythm-modal-chip.active-p6 {
    background: rgba(156, 39, 176, 0.2) !important;
    border-color: #9c27b0 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(156, 39, 176, 0.5);
}

/* 높이가 협소한 모바일 디바이스 지원 */
@media (max-height: 840px) {
    .mixer-rhythm-trigger {
        height: 24px;
        font-size: 0.78rem;
        border-radius: 4px;
    }
    .rhythm-modal-content {
        padding: 16px;
    }
    .rhythm-modal-grid {
        max-height: 270px;
        gap: 6px;
    }
    .rhythm-modal-chip {
        height: 36px;
        font-size: 0.85rem;
    }
    
    /* 믹서 컴포넌트 세로 높이 압축 */
    .mixer-section {
        padding: 4px 2px !important;
        margin: 4px 0 !important;
        gap: 3px !important;
    }
    .mixer-channel {
        padding: 4px 1px !important;
        gap: 4px !important;
    }
    .mixer-fader-container {
        height: 52px !important;
    }
    .fader-vertical {
        height: 44px !important;
    }
    
    /* 템포 및 글로벌 음색 여백 압축 */
    .tempo-slider-row {
        margin-top: 10px !important; /* 자연스럽고 넉넉한 여백 배치 */
        margin-bottom: 2px !important;
    }
    .led-indicators {
        padding-top: 0 !important;
        margin-bottom: 6px !important; /* LED 인디케이터와 LCD 스크린 하단 테두리 간의 간격 확보 */
    }
    .timbre-select-row {
        margin: 4px 0 !important;
    }
    .tempo-label-chip {
        margin-bottom: 4px !important;
        padding: 4px 10px !important;
        font-size: 0.65rem !important;
    }
    .timbre-label-chip {
        margin-bottom: 2px !important;
        padding: 3px 8px !important;
        font-size: 0.62rem !important;
    }
    .timbre-selector-container {
        padding: 0 !important;
    }
    .timbre-nav-btn {
        width: 36px !important;
        height: 36px !important;
    }
    .timbre-display {
        font-size: 0.9rem !important;
    }
    .button-row {
        gap: 8px !important;
    }
}

/* 활성화된 믹서 채널 상단 LED 네온 불빛 효과 */
.mixer-channel.active-glow {
    border-color: rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.mixer-channel.active-glow .mixer-ch-label {
    font-weight: 900;
    text-shadow: 0 0 10px currentColor;
}

#mixer-col-1.active-glow { border-color: rgba(255, 68, 68, 0.3) !important; background: rgba(255, 68, 68, 0.04) !important; }
#mixer-col-1.active-glow .mixer-ch-label { color: #ff4444 !important; }

#mixer-col-2.active-glow { border-color: rgba(255, 153, 0, 0.3) !important; background: rgba(255, 153, 0, 0.04) !important; }
#mixer-col-2.active-glow .mixer-ch-label { color: #ff9900 !important; }

#mixer-col-3.active-glow { border-color: rgba(255, 235, 59, 0.3) !important; background: rgba(255, 235, 59, 0.04) !important; }
#mixer-col-3.active-glow .mixer-ch-label { color: #ffeb3b !important; }

#mixer-col-4.active-glow { border-color: rgba(76, 175, 80, 0.3) !important; background: rgba(76, 175, 80, 0.04) !important; }
#mixer-col-4.active-glow .mixer-ch-label { color: #4caf50 !important; }

#mixer-col-5.active-glow { border-color: rgba(33, 150, 243, 0.3) !important; background: rgba(33, 150, 243, 0.04) !important; }
#mixer-col-5.active-glow .mixer-ch-label { color: #2196f3 !important; }

#mixer-col-6.active-glow { border-color: rgba(156, 39, 176, 0.3) !important; background: rgba(156, 39, 176, 0.04) !important; }
#mixer-col-6.active-glow .mixer-ch-label { color: #9c27b0 !important; }

/* SVG rhythm note icons */
.rhythm-svg {
    height: 20px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}
.rhythm-modal-chip .rhythm-svg {
    height: 28px;
}
.mixer-rhythm-trigger .rhythm-svg {
    height: 18px;
}
/* For smaller screens */
@media (max-height: 840px) {
    .mixer-rhythm-trigger .rhythm-svg {
        height: 15px;
    }
    .rhythm-modal-chip .rhythm-svg {
        height: 24px;
    }
}

/* Mixer Channel Toggle Buttons */
.mixer-toggle-btn {
    width: 80%;
    height: 22px;
    background-color: rgba(30, 30, 30, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    color: var(--text-muted);
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    outline: none;
    padding: 0;
}

.mixer-toggle-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(50, 50, 50, 0.85);
}

.mixer-toggle-btn:active {
    transform: scale(0.92);
}

/* Individual Channel Color-coding when Toggle Button is Active */
#mixer-col-1 .mixer-toggle-btn.active {
    border-color: #ff4444;
    color: #ffffff;
    background: rgba(255, 68, 68, 0.2);
    box-shadow: 0 0 6px rgba(255, 68, 68, 0.4);
}
#mixer-col-2 .mixer-toggle-btn.active {
    border-color: #ff9900;
    color: #ffffff;
    background: rgba(255, 153, 0, 0.2);
    box-shadow: 0 0 6px rgba(255, 153, 0, 0.4);
}
#mixer-col-3 .mixer-toggle-btn.active {
    border-color: #ffeb3b;
    color: #ffffff;
    background: rgba(255, 235, 59, 0.2);
    box-shadow: 0 0 6px rgba(255, 235, 59, 0.4);
}
#mixer-col-4 .mixer-toggle-btn.active {
    border-color: #4caf50;
    color: #ffffff;
    background: rgba(76, 175, 80, 0.2);
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
}
#mixer-col-5 .mixer-toggle-btn.active {
    border-color: #2196f3;
    color: #ffffff;
    background: rgba(33, 150, 243, 0.2);
    box-shadow: 0 0 6px rgba(33, 150, 243, 0.4);
}
#mixer-col-6 .mixer-toggle-btn.active {
    border-color: #9c27b0;
    color: #ffffff;
    background: rgba(156, 39, 176, 0.2);
    box-shadow: 0 0 6px rgba(156, 39, 176, 0.4);
}

/* Tall Faders for VOICE and MASTER to align with P1-P6 */
.mixer-fader-container-tall {
    height: 123px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2px 0;
}
.fader-vertical-tall {
    height: 113px !important;
}

/* For smaller screens height (e.g. mobile compression) */
@media (max-height: 840px) {
    .mixer-toggle-btn {
        height: 18px;
        font-size: 0.58rem;
        border-radius: 4px;
    }
    .mixer-btn-wrapper {
        height: 24px !important;
    }
    .mixer-fader-container-tall {
        height: 74px !important;
    }
    .fader-vertical-tall {
        height: 66px !important;
    }
}

/* Pull to Refresh Indicator Styling */
.pull-to-refresh {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2000;
    pointer-events: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    background-color: rgba(10, 10, 10, 0.9);
    border-bottom: 1px solid var(--border-subtle);
    box-sizing: border-box;
}

.pull-to-refresh.visible {
    opacity: 1;
}

.pull-to-refresh i.spinner {
    transition: transform 0.1s linear;
}

.pull-to-refresh.refreshing i.spinner {
    animation: fa-spin 1s infinite linear;
    color: var(--accent-primary);
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}







