/**
 * MuzeArk Player v4 - Writing Pad Home Layout
 * Restructured 3-panel layout with Writing Pad as center
 */

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

/* ============================================ */
/* === CSS VARIABLES === */
/* ============================================ */
:root {
    --mz-gold: #e2ba87;
    --mz-gold-dim: rgba(226, 186, 135, 0.12);
    --mz-gold-glow: rgba(226, 186, 135, 0.4);
    --mz-bg: #080808;
    --mz-surface: #0c0c0c;
    --mz-surface2: #121212;
    --mz-surface3: #1a1a1a;
    --mz-border: #1a1a1a;
    --mz-border-light: #252525;
    --mz-text: #fff;
    --mz-text-dim: #888;
    --mz-text-muted: #555;
    
    --mz-green: #22c55e;
    --mz-green-dim: rgba(34, 197, 94, 0.15);
    --mz-purple: #a855f7;
    --mz-purple-dim: rgba(168, 85, 247, 0.15);
    --mz-orange: #f97316;
    --mz-orange-dim: rgba(249, 115, 22, 0.15);
    --mz-blue: #3b82f6;
    --mz-red: #ef4444;
    
    --mz-bronze: #cd7f32;
    --mz-bronze-dim: rgba(205, 127, 50, 0.15);
    --mz-silver: #c0c0c0;
    --mz-gold-tier: #ffd700;
    --mz-platinum: #e5e4e2;
    --mz-diamond: #b9f2ff;
}

/* ============================================ */
/* === LAYOUT RESTRUCTURE === */
/* ============================================ */
.muzeark-app {
    display: grid;
    grid-template-columns: 180px 1fr 340px !important;
    height: 100vh;
    background: var(--mz-bg);
}

/* Override old panel-collapsed behavior - always show beat panel */
.muzeark-app.panel-collapsed {
    grid-template-columns: 180px 1fr 340px !important;
}

.muzeark-app.sidebar-collapsed {
    grid-template-columns: 180px 1fr 340px !important;
}

.muzeark-app.sidebar-collapsed.panel-collapsed {
    grid-template-columns: 180px 1fr 340px !important;
}

/* New beat panel takes right column */
.mzk-beat-panel {
    grid-column: 3;
    grid-row: 1;
    display: flex !important;
    width: 340px !important;
}

/* New center panel */
.mzk-center-panel {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Slim sidebar */
.muzeark-sidebar--slim {
    grid-column: 1;
    grid-row: 1;
}

/* ============================================ */
/* === SLIM SIDEBAR === */
/* ============================================ */
.muzeark-sidebar--slim {
    background: var(--mz-surface);
    border-right: 1px solid var(--mz-border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    width: 180px !important;
}

.muzeark-sidebar__logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 14px;
    color: var(--mz-gold);
    letter-spacing: 2px;
    padding: 8px 12px;
    margin-bottom: 24px;
}

/* Slim sidebar nav */
.muzeark-sidebar--slim .muzeark-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.muzeark-sidebar--slim .muzeark-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--mz-text-dim);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    position: relative;
}

.muzeark-sidebar--slim .muzeark-nav__item:hover {
    background: var(--mz-surface2);
    color: var(--mz-text);
}

.muzeark-sidebar--slim .muzeark-nav__item.active {
    background: var(--mz-gold-dim);
    color: var(--mz-gold);
}

.muzeark-nav__icon {
    font-size: 16px;
}

.muzeark-nav__badge {
    position: absolute;
    right: 10px;
    background: var(--mz-orange);
    color: var(--mz-bg);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
}

/* Rank Mini Badge */
.muzeark-rank-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--mz-bronze-dim);
    border: 1px solid rgba(205, 127, 50, 0.2);
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.muzeark-rank-mini:hover {
    border-color: var(--mz-bronze);
}

.muzeark-rank-mini__badge {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--mz-bronze), #a05a2c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.muzeark-rank-mini__info {
    flex: 1;
}

.muzeark-rank-mini__tier {
    font-weight: 700;
    font-size: 12px;
    color: var(--mz-bronze);
}

.muzeark-rank-mini__xp {
    font-size: 10px;
    color: var(--mz-text-dim);
}

.muzeark-rank-mini__progress {
    height: 3px;
    background: var(--mz-border);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.muzeark-rank-mini__progress-fill {
    height: 100%;
    background: var(--mz-bronze);
    border-radius: 2px;
}

/* User Pill */
.muzeark-user-pill {
    padding: 10px 12px;
}

.muzeark-user-pill__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.muzeark-user-pill__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.muzeark-user-pill__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.muzeark-user-pill__info {
    display: flex;
    flex-direction: column;
}

.muzeark-user-pill__name {
    font-weight: 600;
    font-size: 13px;
    color: var(--mz-text);
}

.muzeark-user-pill__tier {
    font-size: 10px;
    color: var(--mz-gold);
    font-weight: 700;
}

/* ============================================ */
/* === CENTER PANEL - WRITING PAD === */
/* ============================================ */
.muzeark-main {
    background: var(--mz-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Notification Bar */
.mzk-notif-bar {
    padding: 10px 24px;
    background: var(--mz-orange-dim);
    border-bottom: 1px solid rgba(249, 115, 22, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-notif-bar:hover {
    background: rgba(249, 115, 22, 0.2);
}

.mzk-notif-bar__icon {
    font-size: 16px;
}

.mzk-notif-bar__text {
    font-size: 13px;
    color: var(--mz-orange);
    font-weight: 600;
    flex: 1;
}

.mzk-notif-bar__action {
    font-size: 12px;
    color: var(--mz-text-dim);
}

/* Transport Bar (DAW-style) */
.mzk-transport {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(180deg, #141414 0%, var(--mz-surface) 100%);
    border-bottom: 2px solid var(--mz-border);
    gap: 16px;
}

/* Mode Tabs Bar (Top - above transport) */
.mzk-mode-tabs-bar {
    display: flex;
    padding: 12px 16px;
    background: var(--mz-surface);
    border-bottom: 1px solid var(--mz-border);
}

.mzk-mode-tabs-bar .mzk-mode-tabs {
    display: flex;
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 8px;
    overflow: hidden;
    padding: 4px;
    gap: 4px;
}

.mzk-mode-tabs-bar .mzk-mode-btn {
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--mz-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-mode-tabs-bar .mzk-mode-btn:hover {
    color: var(--mz-text-dim);
    background: var(--mz-surface2);
}

.mzk-mode-tabs-bar .mzk-mode-btn.active {
    background: var(--mz-orange);
    color: #000;
}

.mzk-transport__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

.mzk-transport__art {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--mz-gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: var(--mz-gold);
    flex-shrink: 0;
    overflow: hidden;
}

.mzk-transport__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mzk-transport__info {
    min-width: 0;
}

.mzk-transport__title {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzk-transport__artist {
    font-size: 11px;
    color: var(--mz-text-dim);
}

/* Transport Center - Controls */
.mzk-transport__center {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: center;
}

/* Mode Tabs */
.mzk-transport__modes {
    display: flex;
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 6px;
    overflow: hidden;
}

.mzk-mode-btn {
    padding: 8px 14px;
    background: transparent;
    border: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--mz-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-mode-btn:hover {
    color: var(--mz-text-dim);
    background: var(--mz-surface2);
}

.mzk-mode-btn.active {
    background: var(--mz-gold);
    color: var(--mz-bg);
}

/* Transport Controls */
.mzk-transport__controls {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--mz-bg);
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid var(--mz-border);
}

.mzk-ctrl-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    color: var(--mz-text-dim);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mzk-ctrl-btn:hover {
    background: var(--mz-surface2);
    color: var(--mz-text);
}

.mzk-ctrl-btn--play {
    width: 44px;
    height: 44px;
    background: var(--mz-gold) !important;
    color: var(--mz-bg) !important;
    font-size: 18px;
    border-radius: 50%;
}

.mzk-ctrl-btn--play:hover {
    background: #d4a574 !important;
    transform: scale(1.05);
}

/* Force gold on play button (override muzeark.css) */
.muzeark-writing-pad__play-btn.mzk-ctrl-btn--play {
    background: var(--mz-gold) !important;
    color: var(--mz-bg) !important;
    border-radius: 50% !important;
}

/* Hide title row in writing area - moved to transport */
.muzeark-writing-pad__title-row {
    display: none !important;
}

/* Timeline */
.mzk-transport__timeline {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.mzk-transport__time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--mz-text-muted);
    min-width: 36px;
}

.mzk-transport__time--current {
    color: var(--mz-gold);
    font-weight: 700;
}

.mzk-transport__progress {
    flex: 1;
    height: 6px;
    background: var(--mz-border);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    min-width: 80px;
}

.mzk-transport__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mz-gold), #d4a574);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Speed Controls */
.mzk-transport__speed {
    display: flex;
    gap: 2px;
    background: var(--mz-bg);
    padding: 3px;
    border-radius: 6px;
    border: 1px solid var(--mz-border);
}

.mzk-speed-btn {
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--mz-text-dim);
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-speed-btn:hover {
    color: var(--mz-text);
}

.mzk-speed-btn.active {
    background: var(--mz-gold);
    color: var(--mz-bg);
}

/* BPM Display */
.mzk-transport__bpm {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 8px;
}

.mzk-transport__bpm-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 800;
    color: var(--mz-gold);
    line-height: 1;
}

.mzk-transport__bpm-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--mz-text-muted);
}

/* Transport Right */
.mzk-transport__right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 120px;
    justify-content: flex-end;
}

/* Transport Meta (BPM, Key, Duration) */
.mzk-transport__meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--mz-text-dim);
    margin-top: 2px;
}

.mzk-transport__meta span {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Time Position Display */
.mzk-transport__time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mzk-transport__time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--mz-text);
}

.mzk-transport__time-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--mz-text-muted);
    text-transform: uppercase;
}

/* Click Button (Metronome) */
.mzk-ctrl-btn--click {
    width: auto !important;
    padding: 0 12px !important;
    gap: 6px;
    font-size: 11px !important;
    font-weight: 700;
    color: var(--mz-text-dim) !important;
    border: 1px solid var(--mz-border);
    border-radius: 6px !important;
}

.mzk-ctrl-btn--click.active {
    background: var(--mz-orange, #f97316) !important;
    color: #000 !important;
    border-color: var(--mz-orange, #f97316) !important;
}

.mzk-ctrl-btn--click .mzk-click-icon {
    font-size: 12px;
}

/* Record Button */
.mzk-ctrl-btn--record {
    color: var(--mz-text-muted) !important;
    font-size: 18px !important;
}

.mzk-ctrl-btn--record.armed {
    background: var(--mz-red, #ef4444) !important;
    color: #fff !important;
}

.mzk-ctrl-btn--record.recording {
    background: var(--mz-red, #ef4444) !important;
    color: #fff !important;
    animation: pulse-record 1s infinite;
}

@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ===== EXPORT BAR ===== */
.mzk-export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--mz-surface);
    border-top: 1px solid var(--mz-border);
}

.mzk-export-bar__stats {
    display: flex;
    gap: 32px;
}

.mzk-export-bar__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mzk-export-bar__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--mz-text);
}

.mzk-export-bar__label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--mz-text-muted);
    text-transform: uppercase;
}

.mzk-export-bar__actions {
    display: flex;
    gap: 12px;
}

.mzk-export-bar__btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mzk-export-bar__btn--secondary {
    background: var(--mz-surface2);
    color: var(--mz-text);
    border: 1px solid var(--mz-border);
}

.mzk-export-bar__btn--secondary:hover:not(:disabled) {
    background: var(--mz-surface3);
    border-color: var(--mz-border-light);
}

.mzk-export-bar__btn--secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mzk-export-bar__btn--primary {
    background: var(--mz-green);
    color: var(--mz-bg);
}

.mzk-export-bar__btn--primary:hover {
    background: #1ea550;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.mzk-transport__license {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--mz-gold);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.mzk-transport__license:hover {
    background: #f0c896;
    transform: scale(1.05);
}

.mzk-transport__license--member {
    background: var(--mz-purple);
    color: #fff;
}

.mzk-transport__license--member:hover {
    background: #9333ea;
}

/* Section Tabs */
.mzk-section-tabs {
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--mz-border);
    background: var(--mz-surface);
    flex-wrap: wrap;
}

.mzk-section-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mz-text-dim);
    background: var(--mz-surface2);
    border: 1px solid var(--mz-border);
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-section-tab:hover {
    border-color: var(--mz-border-light);
    color: var(--mz-text);
}

.mzk-section-tab.active {
    background: var(--mz-gold);
    border-color: var(--mz-gold);
    color: var(--mz-bg);
}

.mzk-section-tab.has-content::after {
    content: '✓';
    margin-left: 6px;
    font-size: 10px;
}

/* Writing Area */
.mzk-writing-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.mzk-section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--mz-text-muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mzk-bar-count {
    color: var(--mz-gold);
}

/* Lines Container */
.mzk-lines-container {
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    border-radius: 12px;
    overflow: hidden;
}

.mzk-line-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--mz-border);
}

.mzk-line-row:last-child {
    border-bottom: none;
}

.mzk-line-num {
    width: 40px;
    padding: 16px 0;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--mz-text-muted);
    background: var(--mz-surface2);
    border-right: 1px solid var(--mz-border);
    flex-shrink: 0;
}

.mzk-line-input {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--mz-text);
    line-height: 1.5;
}

.mzk-line-input:focus {
    outline: none;
    background: var(--mz-surface2);
}

.mzk-line-input::placeholder {
    color: var(--mz-text-muted);
}

.mzk-line-rhyme {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Writing Stats */
.mzk-writing-stats {
    display: flex;
    gap: 20px;
    padding: 14px 0;
    margin-top: 12px;
    border-top: 1px solid var(--mz-border);
}

.mzk-stat-item {
    font-size: 12px;
    color: var(--mz-text-dim);
}

.mzk-stat-item strong {
    font-family: 'JetBrains Mono', monospace;
    color: var(--mz-gold);
}

.mzk-stat-item--rhyme {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mzk-rhyme-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.mzk-rhyme-dot--a {
    background: var(--mz-gold);
}

.mzk-rhyme-dot--b {
    background: var(--mz-purple);
}

/* Pad Footer - Search */
.mzk-pad-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--mz-border);
    background: var(--mz-surface);
    flex-shrink: 0;
}

.mzk-pad-search {
    position: relative;
    display: flex;
    align-items: center;
}

.mzk-pad-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--mz-text-muted);
    pointer-events: none;
}

.mzk-pad-search__input {
    flex: 1;
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 8px;
    padding: 12px 44px 12px 42px; /* Right padding for clear button only */
    font-size: 13px;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--mz-text);
    transition: border-color 0.2s;
}

.mzk-pad-search__input:focus {
    outline: none;
    border-color: var(--mz-gold);
}

.mzk-pad-search__input::placeholder {
    color: var(--mz-text-muted);
}

/* Clear button - inside search bar */
.mzk-pad-search__clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--mz-text-muted);
    opacity: 0.7;
    transition: opacity 0.15s;
}

.mzk-pad-search__clear:hover {
    opacity: 1;
    color: var(--mz-text);
}

/* Autocomplete dropdown */
.mzk-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.mzk-autocomplete.active {
    display: block;
}

.mzk-autocomplete__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.mzk-autocomplete__item:hover,
.mzk-autocomplete__item.focused {
    background: var(--mz-surface2);
}

.mzk-autocomplete__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    flex-shrink: 0;
}

.mzk-autocomplete__icon--artist {
    background: var(--mz-purple-dim);
    color: var(--mz-purple);
}

.mzk-autocomplete__icon--region {
    background: var(--mz-gold-dim);
    color: var(--mz-gold);
}

.mzk-autocomplete__icon--genre {
    background: rgba(34, 197, 94, 0.15);
    color: var(--mz-green);
}

.mzk-autocomplete__icon--vibe {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.mzk-autocomplete__icon--instrument {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.mzk-autocomplete__content {
    flex: 1;
    min-width: 0;
}

.mzk-autocomplete__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--mz-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzk-autocomplete__meta {
    font-size: 11px;
    color: var(--mz-text-muted);
}

.mzk-autocomplete__count {
    font-size: 11px;
    color: var(--mz-text-dim);
    padding: 2px 6px;
    background: var(--mz-surface2);
    border-radius: 10px;
}

/* Search info text */
.mzk-pad-search__info {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--mz-text-muted);
}

/* ============================================ */
/* === RIGHT PANEL - BEAT PANEL === */
/* ============================================ */
.mzk-beat-panel {
    background: var(--mz-surface) !important;
    border-left: 1px solid var(--mz-border) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    overflow: hidden !important;
}

/* Elite Button Bar */
.mzk-elite-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.15) 0%, rgba(226, 186, 135, 0.1) 100%);
    border-bottom: 1px solid rgba(168, 85, 247, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.mzk-elite-bar:hover {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.25) 0%, rgba(226, 186, 135, 0.15) 100%);
}

.mzk-elite-bar__crown {
    font-size: 18px;
}

.mzk-elite-bar__text {
    font-size: 12px;
    color: var(--mz-gold);
    letter-spacing: 0.3px;
}

.mzk-elite-bar__text strong {
    color: #fff;
}

.mzk-elite-bar__count {
    margin-left: auto;
    font-size: 11px;
    color: var(--mz-text-dim);
}

.mzk-elite-bar__count strong {
    color: var(--mz-gold);
}

/* Beat List Section */
.mzk-beat-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mzk-beat-list-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--mz-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mzk-beat-list-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--mz-text-dim);
    letter-spacing: 0.5px;
}

.mzk-sort-select {
    background: var(--mz-surface2);
    border: 1px solid var(--mz-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--mz-text-dim);
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
}

.mzk-sort-select:focus {
    outline: none;
    border-color: var(--mz-gold);
}

/* Beat List */
.mzk-beat-list,
.muzeark-tracks.mzk-beat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Beat Item */
.mzk-beat-item,
.muzeark-track.mzk-beat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.mzk-beat-item:hover,
.muzeark-track.mzk-beat-item:hover {
    background: var(--mz-surface2);
    border-color: var(--mz-border);
}

.mzk-beat-item.playing,
.muzeark-track.mzk-beat-item.playing {
    background: var(--mz-gold-dim);
    border: 1px solid rgba(226, 186, 135, 0.3);
}

.mzk-beat-item__art {
    width: 40px;
    height: 40px;
    background: var(--mz-surface2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--mz-border);
}

.mzk-beat-item__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.mzk-beat-item__art-letter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--mz-text-dim);
    transition: opacity 0.2s;
}

.mzk-beat-item__play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.mzk-beat-item:hover .mzk-beat-item__play-overlay {
    opacity: 1;
}

.mzk-beat-item:hover .mzk-beat-item__art-letter {
    opacity: 0;
}

.mzk-beat-item__info {
    flex: 1;
    min-width: 0;
}

.mzk-beat-item__row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.mzk-beat-item__name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzk-beat-item__downloaded {
    font-size: 9px;
    font-weight: 700;
    color: var(--mz-purple);
    background: var(--mz-purple-dim);
    padding: 3px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.mzk-beat-item__meta {
    font-size: 11px;
    color: var(--mz-text-dim);
    margin-bottom: 4px;
}

.mzk-beat-item__tags {
    display: flex;
    gap: 4px;
}

.mzk-beat-tag {
    font-size: 9px;
    padding: 3px 6px;
    background: var(--mz-surface3);
    border-radius: 4px;
    color: var(--mz-text-muted);
}

.mzk-beat-item__add {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--mz-border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--mz-text-dim);
    cursor: pointer;
    transition: all 0.15s;
    opacity: 0;
}

.mzk-beat-item:hover .mzk-beat-item__add {
    opacity: 1;
}

.mzk-beat-item__add:hover {
    border-color: var(--mz-green);
    color: var(--mz-green);
    background: rgba(34, 197, 94, 0.1);
}

.mzk-beat-item__saves {
    font-size: 11px;
    color: var(--mz-text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.15s;
}

.mzk-beat-item__saves:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.mzk-beat-item__saves.liked,
.mzk-beat-item__saves:hover svg {
    color: #ef4444;
}

.mzk-beat-item__saves.liked svg {
    fill: #ef4444;
}

.mzk-beat-item__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mzk-beat-item__btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.15s;
}

/* Cart button */
.mzk-beat-item__btn--cart {
    background: transparent;
    color: var(--mz-text-dim);
    border: 1px solid var(--mz-border);
}

.mzk-beat-item__btn--cart:hover {
    background: rgba(226, 186, 135, 0.1);
    border-color: var(--mz-gold);
    color: var(--mz-gold);
}

.mzk-beat-item__btn--cart.in-cart {
    background: var(--mz-gold);
    border-color: var(--mz-gold);
    color: #000;
}

.mzk-beat-item__btn--license {
    background: var(--mz-gold);
    color: #000;
}

.mzk-beat-item__btn--license:hover {
    background: #f0c896;
    transform: scale(1.05);
}

.mzk-beat-item__btn--dl {
    background: var(--mz-purple);
    color: #fff;
}

.mzk-beat-item__btn--dl:hover {
    background: #9333ea;
    transform: scale(1.05);
}

/* Cart Section */
.mzk-cart-section {
    border-top: 1px solid var(--mz-border);
    background: var(--mz-surface2);
    padding: 14px;
    flex-shrink: 0;
}

.mzk-cart-section__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.mzk-cart-section__icon {
    font-size: 14px;
}

.mzk-cart-section__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--mz-text-dim);
}

.mzk-cart-section__count {
    margin-left: auto;
    font-size: 11px;
    color: var(--mz-text-muted);
}

.mzk-cart-section__expand {
    background: transparent;
    border: 1px solid var(--mz-border);
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--mz-text-dim);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.mzk-cart-section__expand:hover {
    background: var(--mz-gold-dim);
    border-color: var(--mz-gold);
    color: var(--mz-gold);
}

.mzk-cart-section__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 140px;
    overflow-y: auto;
}

.mzk-cart-empty {
    text-align: center;
    padding: 20px;
    color: var(--mz-text-muted);
    font-size: 12px;
}

.mzk-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--mz-surface);
    border-radius: 8px;
    border: 1px solid var(--mz-border);
}

.mzk-cart-item__art {
    width: 36px;
    height: 36px;
    background: var(--mz-gold-dim);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 800;
    color: var(--mz-gold);
    flex-shrink: 0;
}

.mzk-cart-item__info {
    flex: 1;
    min-width: 0;
}

.mzk-cart-item__name {
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzk-cart-item__license {
    font-size: 10px;
    color: var(--mz-text-muted);
}

.mzk-cart-item__price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--mz-text);
}

.mzk-cart-item__remove {
    background: none;
    border: none;
    color: var(--mz-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.mzk-cart-item__remove:hover {
    color: var(--mz-red);
}

.mzk-cart-section__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.mzk-cart-section__total {
    display: flex;
    flex-direction: column;
}

.mzk-cart-section__total-label {
    font-size: 10px;
    color: var(--mz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mzk-cart-section__total-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 800;
    color: var(--mz-text);
}

.mzk-cart-section__checkout {
    padding: 12px 20px;
    background: var(--mz-gold);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--mz-bg);
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-cart-section__checkout:hover {
    background: #f0c896;
    transform: translateY(-1px);
}

.mzk-cart-section__upsell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--mz-gold-dim);
    border-radius: 8px;
    font-size: 11px;
    color: var(--mz-text-dim);
}

.mzk-cart-section__upsell a {
    color: var(--mz-gold);
    font-weight: 600;
    text-decoration: none;
}

.mzk-cart-section__upsell a:hover {
    text-decoration: underline;
}

.mzk-cart-total__price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 800;
    color: var(--mz-text);
}

.mzk-cart-checkout {
    padding: 12px 24px;
    background: var(--mz-green);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--mz-bg);
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-cart-checkout:hover {
    background: #1ea550;
    transform: translateY(-1px);
}

.mzk-cart-elite-upsell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--mz-gold-dim);
    border-radius: 6px;
    font-size: 11px;
    color: var(--mz-text-dim);
}

.mzk-cart-elite-upsell strong {
    color: var(--mz-gold);
}

.mzk-cart-elite-upsell a {
    color: var(--mz-gold);
    text-decoration: none;
    font-weight: 600;
}

.mzk-cart-elite-upsell a:hover {
    text-decoration: underline;
}

/* ============================================ */
/* === LEGACY COMPATIBILITY === */
/* ============================================ */

/* These elements have been removed from HTML but keep rules in case they're referenced elsewhere */
.muzeark-tune-bar,
.muzeark-tune-panel,
.muzeark-tune-actbar,
.muzeark-elite-banner,
.muzeark-nowplaying,
.muzeark-cart-fab,
.muzeark-panel-toggle,
.muzeark-bottom-nav,
.muzeark-mobile-menu {
    display: none !important;
}

/* Cart Bar at bottom of right panel */
.mzk-cart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--mz-surface2);
    border-top: 1px solid var(--mz-border);
    flex-shrink: 0;
}

.mzk-cart-bar__info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mz-text-dim);
    font-size: 13px;
}

.mzk-cart-bar__info svg {
    color: var(--mz-gold);
}

.mzk-cart-bar__count {
    font-weight: 700;
    color: var(--mz-text);
}

.mzk-cart-bar__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--mz-gold);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-cart-bar__btn:hover {
    background: #f0c896;
}

/* Projects view - show when data-view="projects" */
.muzeark-app[data-view="projects"] .mzk-center-panel,
.muzeark-app[data-view="projects"] .mzk-beat-panel {
    display: none !important;
}

.muzeark-app[data-view="projects"] .muzeark-projects-view {
    display: block !important;
    position: absolute;
    top: 0;
    left: 180px;
    right: 0;
    bottom: 0;
    background: var(--mz-bg);
    z-index: 10;
    overflow-y: auto;
}

/* Keep Writing Pad overlay functional but hidden by default */
.muzeark-writing-pad {
    /* Controlled by .open class in existing CSS */
}

/* EMBEDDED Writing Pad - override overlay behavior */
.muzeark-writing-pad.mzk-embedded-pad {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 1 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: transparent !important;
}

.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__header {
    padding: 10px 16px !important;
    border-bottom: 1px solid var(--mz-border) !important;
}

.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__back {
    display: none !important; /* No back button needed when embedded */
}

.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__player {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--mz-border) !important;
}

.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__nav {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--mz-border) !important;
}

.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__content {
    flex: 1 !important;
    padding: 0 16px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.muzeark-writing-pad.mzk-embedded-pad .wp-grid-pages {
    flex: 1 !important;
    overflow-y: auto !important;
}

.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__stats {
    padding: 12px 0 !important;
    border-top: 1px solid var(--mz-border) !important;
}

.mzk-embedded-pad .muzeark-writing-pad__nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mz-border);
    flex-shrink: 0;
}

.mzk-embedded-pad .muzeark-writing-pad__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mzk-embedded-pad .muzeark-writing-pad__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    flex-shrink: 0;
}

.mzk-embedded-pad .wp-grid-pages {
    flex: 1;
    overflow-y: auto;
}

/* ============================================
   WRITING PAD START OVERLAY
   ============================================ */
.wp-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 17, 17, 0.95);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    backdrop-filter: blur(8px);
}

.wp-start-overlay.hidden {
    display: none;
}

.wp-start-overlay__drop-target {
    width: 100%;
    max-width: 500px;
    min-height: 300px;
    border: 3px dashed var(--mz-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    transition: all 0.25s;
    background: rgba(255, 255, 255, 0.02);
}

.wp-start-overlay__drop-target.dragover {
    border-color: var(--mz-gold);
    background: rgba(226, 186, 135, 0.1);
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(226, 186, 135, 0.2);
}

.wp-start-overlay__header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--mz-gold);
    margin-bottom: 24px;
}

.wp-start-overlay__icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.wp-start-overlay__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--mz-text);
    margin-bottom: 12px;
}

.wp-start-overlay__subtitle {
    font-size: 15px;
    color: var(--mz-text-dim);
}

.wp-start-overlay__resume {
    margin-top: 32px;
    width: 100%;
    max-width: 320px;
}

.wp-start-overlay__select {
    width: 100%;
    padding: 14px 16px;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    border-radius: 10px;
    color: var(--mz-text);
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.wp-start-overlay__select:focus {
    outline: none;
    border-color: var(--mz-gold);
}

/* ============================================
   SESSION MODAL (after drop)
   ============================================ */
.wp-session-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.wp-session-modal.open {
    display: flex;
}

.wp-session-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.wp-session-modal__content {
    position: relative;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wp-session-modal__header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--mz-text);
}

.wp-session-modal__beat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--mz-bg);
    border-radius: 10px;
    margin-bottom: 24px;
}

.wp-session-modal__beat img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.wp-session-modal__beat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wp-session-modal__beat-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--mz-text);
}

.wp-session-modal__beat-meta {
    font-size: 13px;
    color: var(--mz-text-dim);
}

.wp-session-modal__field {
    margin-bottom: 20px;
}

.wp-session-modal__field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mz-text-dim);
    margin-bottom: 10px;
}

.wp-session-modal__field input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 10px;
    color: var(--mz-text);
    font-size: 15px;
}

.wp-session-modal__field input[type="text"]:focus {
    outline: none;
    border-color: var(--mz-gold);
}

.wp-session-modal__options {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wp-session-modal__option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--mz-bg);
    border: 2px solid var(--mz-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.wp-session-modal__option:hover {
    border-color: var(--mz-text-dim);
}

.wp-session-modal__option:has(input:checked) {
    border-color: var(--mz-gold);
    background: rgba(226, 186, 135, 0.1);
}

.wp-session-modal__option input {
    display: none;
}

.wp-session-modal__option-icon {
    font-size: 28px;
}

.wp-session-modal__option-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mz-text);
}

.wp-session-modal__project-select {
    display: none;
    width: 100%;
    padding: 12px 14px;
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 8px;
    color: var(--mz-text);
    font-size: 14px;
}

.wp-session-modal__project-select.visible {
    display: block;
}

.wp-session-modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.wp-session-modal__actions .muzeark-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 14px;
}

/* Beat dragging state */
.muzeark-track.dragging,
.mzk-beat-item.dragging {
    opacity: 0.4;
    transform: scale(0.98);
    cursor: grabbing;
}

.muzeark-track[draggable="true"],
.mzk-beat-item[draggable="true"] {
    cursor: grab;
}

/* Cart drop zone highlight */
.mzk-cart-section.cart-dragover {
    background: rgba(226, 186, 135, 0.15) !important;
    border-color: var(--mz-gold) !important;
    box-shadow: inset 0 0 20px rgba(226, 186, 135, 0.1);
    position: relative;
}

.mzk-cart-section.cart-dragover::after {
    content: '+ Drop to add to cart';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--mz-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    white-space: nowrap;
}

.mzk-embedded-pad .muzeark-writing-pad__stats {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    font-size: 12px;
    color: var(--mz-text-dim);
    border-top: 1px solid var(--mz-border);
    flex-shrink: 0;
}

.mzk-embedded-pad .muzeark-writing-pad__gate {
    position: absolute;
    inset: 0;
    background: var(--mz-bg);
    z-index: 10;
}

.mzk-embedded-pad .muzeark-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

/* Embedded pad header */
.mzk-embedded-pad .muzeark-writing-pad__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--mz-border);
    flex-shrink: 0;
}

.mzk-embedded-pad .muzeark-writing-pad__header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mzk-embedded-pad .muzeark-writing-pad__autosave {
    font-size: 11px;
    color: var(--mz-text-dim);
}

.mzk-embedded-pad .muzeark-writing-pad__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Embedded pad player row */
.mzk-embedded-pad .muzeark-writing-pad__player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mz-border);
    flex-shrink: 0;
}

.mzk-embedded-pad .muzeark-writing-pad__player-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.mzk-embedded-pad .muzeark-writing-pad__play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mz-purple);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.15s;
}

.mzk-embedded-pad .muzeark-writing-pad__play-btn:hover {
    background: #9333ea;
    transform: scale(1.05);
}

.mzk-embedded-pad .muzeark-writing-pad__player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex-shrink: 0;
}

.mzk-embedded-pad .muzeark-writing-pad__track-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--mz-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mzk-embedded-pad .muzeark-writing-pad__track-meta {
    font-size: 12px;
    color: var(--mz-text-dim);
}

.mzk-embedded-pad .muzeark-writing-pad__player-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}

.mzk-embedded-pad .muzeark-progress {
    height: 4px;
    background: var(--mz-surface2);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.mzk-embedded-pad .muzeark-progress__bar {
    height: 100%;
    background: var(--mz-purple);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.mzk-embedded-pad .muzeark-writing-pad__player-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--mz-text-dim);
}

/* ============================================ */
/* === NOTIFICATION MODAL (v3.82.16) === */
/* ============================================ */
.mzk-notif-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mzk-notif-modal {
    background: var(--mz-surface);
    border: 1px solid var(--mz-border-light);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow: hidden;
    animation: mzkModalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mzkModalSlide {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.mzk-notif-modal__header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--mz-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mzk-notif-modal__title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mz-text);
}

.mzk-notif-modal__count {
    background: var(--mz-orange);
    color: var(--mz-bg);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
}

.mzk-notif-modal__close {
    background: none;
    border: none;
    color: var(--mz-text-dim);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.mzk-notif-modal__close:hover {
    color: var(--mz-text);
}

.mzk-notif-modal__body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.mzk-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-notif-item:hover {
    background: var(--mz-surface2);
}

/* Urgent (contracts) */
.mzk-notif-item--urgent {
    background: var(--mz-orange-dim);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.mzk-notif-item--urgent:hover {
    border-color: var(--mz-orange);
}

/* Rank notification */
.mzk-notif-item--rank {
    background: var(--mz-bronze-dim);
    border: 1px solid rgba(205, 127, 50, 0.2);
}

.mzk-notif-item--rank:hover {
    border-color: var(--mz-bronze);
}

/* Icon - square rounded */
.mzk-notif-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--mz-surface2);
}

.mzk-notif-item__icon--urgent {
    background: var(--mz-orange);
}

.mzk-notif-item__icon--rank {
    background: linear-gradient(135deg, var(--mz-bronze), #a05a2c);
}

.mzk-notif-item__content {
    flex: 1;
    min-width: 0;
}

.mzk-notif-item__text {
    font-size: 14px;
    font-weight: 600;
    color: var(--mz-text);
    margin-bottom: 4px;
}

.mzk-notif-item__meta {
    font-size: 12px;
    color: var(--mz-text-dim);
}

/* Gold action button */
.mzk-notif-item__btn {
    padding: 6px 14px;
    background: var(--mz-gold);
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--mz-bg);
    cursor: pointer;
    align-self: center;
    flex-shrink: 0;
}

.mzk-notif-item__btn:hover {
    background: #f0c896;
}

.mzk-notif-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--mz-border);
    text-align: center;
}

.mzk-notif-modal__dismiss {
    background: none;
    border: none;
    color: var(--mz-text-dim);
    font-size: 13px;
    cursor: pointer;
}

.mzk-notif-modal__dismiss:hover {
    color: var(--mz-text);
}

/* Empty state */
.mzk-notif-empty {
    text-align: center;
    padding: 40px 20px;
}

.mzk-notif-empty__icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.mzk-notif-empty__text {
    font-size: 14px;
    color: var(--mz-text-dim);
}

/* Streak badge on rank card */
.muzeark-rank-mini__streak {
    font-size: 12px;
    font-weight: 700;
    color: var(--mz-orange);
    background: var(--mz-orange-dim);
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ============================================ */
/* === HIDE DUPLICATE MODE TOGGLE (v3.82.19) === */
/* ============================================ */
/* The JS buildModeToggle() creates this automatically, 
   but we have mode tabs in transport now */
.wp-mode-toggle {
    display: none !important;
}

/* Keep transport modes visible */
.mzk-transport__modes {
    display: flex !important;
}

/* Cart loading state */
.mzk-cart-loading {
    text-align: center;
    padding: 20px;
    color: var(--mz-text-muted);
    font-size: 12px;
}

/* ============================================ */
/* === LIBRARY VIEW (v3.86.0) === */
/* ============================================ */

/* Library view - show when data-view="library" */
.muzeark-app[data-view="library"] .mzk-center-panel,
.muzeark-app[data-view="library"] .mzk-beat-panel {
    display: none !important;
}

.muzeark-app[data-view="library"] .muzeark-library-view {
    display: flex !important;
}

.muzeark-library-view {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mz-bg);
    z-index: 10;
    flex-direction: column;
    overflow: hidden;
}

.muzeark-library {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-y: auto;
}

.muzeark-library__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--mz-border);
}

.muzeark-library__close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    color: var(--mz-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.muzeark-library__close:hover {
    background: var(--mz-surface2);
    border-color: var(--mz-orange);
    color: var(--mz-orange);
}

.muzeark-library__header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--mz-text);
    margin: 0;
    flex: 1;
}

.muzeark-library__subtitle {
    color: var(--mz-text-muted);
    font-size: 13px;
    margin: 0;
    padding: 12px 20px;
    border-bottom: 1px solid var(--mz-border);
}

.muzeark-library__filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--mz-border);
}

.muzeark-library__stats {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: var(--mz-surface);
    border-bottom: 1px solid var(--mz-border);
}

.muzeark-library__list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.muzeark-library__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid var(--mz-border);
}

.muzeark-library__spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--mz-border);
    border-top-color: var(--mz-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.muzeark-library__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: var(--mz-text-dim);
}

.muzeark-pull-bar {
    display: block;
    width: 40px;
    height: 4px;
    background: var(--mz-border);
    border-radius: 2px;
    margin: 8px auto;
}

/* Loop button active state */
#wp-loop-toggle.active,
.mzk-ctrl-btn.active {
    background: var(--mz-gold);
    color: var(--mz-bg);
}

#wp-loop-toggle.active:hover,
.mzk-ctrl-btn.active:hover {
    background: #f0c896;
}

/* Rhyme legend in stats bar */
.wp-rhyme-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.wp-rhyme-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--mz-text-dim);
}

.wp-rhyme-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.wp-rhyme-legend-dot.rhyme-a { background: #f97316; }
.wp-rhyme-legend-dot.rhyme-b { background: #8b5cf6; }
.wp-rhyme-legend-dot.rhyme-c { background: #06b6d4; }
.wp-rhyme-legend-dot.rhyme-d { background: #ec4899; }

/* Stats bar layout fix */
.muzeark-writing-pad__stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid var(--mz-border);
    font-size: 12px;
    color: var(--mz-text-dim);
}

/* Writes badge pushed to right - match original styling */
.muzeark-writing-pad__writes-badge {
    margin-left: auto !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.muzeark-writing-pad__writes-badge.limited {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid #ef4444 !important;
}

.muzeark-writing-pad__writes-badge.unlimited {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid #4ade80 !important;
}

/* ============================================ */
/* === v3.82.25 FIXES === */
/* ============================================ */

/* Hide beat artwork thumbnails - text-only list */
.mzk-beat-item__art {
    display: none !important;
}

/* Force gold on play button */
.muzeark-writing-pad__play-btn,
.muzeark-writing-pad__play-btn.mzk-ctrl-btn--play,
#wp-play {
    background: var(--mz-gold) !important;
    color: var(--mz-bg) !important;
    border-radius: 50% !important;
}

.muzeark-writing-pad__play-btn:hover,
#wp-play:hover {
    background: #d4a574 !important;
}

/* Hide title row in writing area - moved to transport */
.muzeark-writing-pad__title-row {
    display: none !important;
}

/* ============================================ */
/* === v3.82.26 - TRANSPORT & PROMO CLEANUP === */
/* ============================================ */

/* Hide floating bundle banner (moved to cart) */
.muzeark-bundle-banner {
    display: none !important;
}

/* Mode tabs at bottom of writing area */
.mzk-mode-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 12px 20px;
    background: var(--mz-surface);
    border-top: 1px solid var(--mz-border);
}

/* Hide old transport mode tabs */
.mzk-transport__modes {
    display: none !important;
}

/* Cart bundle section */
.mzk-cart-section__bundle {
    padding: 0 12px 12px;
}

.mzk-cart-section__bundle:empty {
    display: none;
}

/* Transport tweaks for centering */
.mzk-transport__center {
    flex: 1;
    justify-content: center;
}

.mzk-transport__left {
    min-width: 160px;
}

.mzk-transport__right {
    min-width: 200px;
    justify-content: flex-end;
}

/* Hide timeline when no beat loaded */
.mzk-transport__timeline {
    min-width: 120px;
}

/* Cart bundle banner styling */
.mzk-cart-bundle {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.05) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
}

.mzk-cart-bundle .muzeark-bundle-banner__icon {
    font-size: 20px;
}

.mzk-cart-bundle .muzeark-bundle-banner__title {
    font-size: 12px;
    font-weight: 700;
    color: var(--mz-text);
}

.mzk-cart-bundle .muzeark-bundle-banner__sub {
    font-size: 10px;
    color: var(--mz-text-dim);
}

.mzk-cart-bundle .muzeark-bundle-banner__dots {
    display: flex;
    gap: 4px;
}

.mzk-cart-bundle .muzeark-bundle-banner__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mz-surface3);
    border: 1px solid var(--mz-border);
}

.mzk-cart-bundle .muzeark-bundle-banner__dot.filled {
    background: #22c55e;
    border-color: #22c55e;
}

.mzk-cart-bundle .muzeark-bundle-banner__price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #22c55e;
}

.mzk-cart-bundle.complete {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

/* ============================================ */
/* === v3.82.26 - CLEAN TRANSPORT === */
/* ============================================ */

/* Hide bundle banner */
.muzeark-bundle-banner,
.mzk-cart-bundle,
#bundle-banner,
#cart-bundle-banner {
    display: none !important;
}

/* Transport - simplified centered layout */
.mzk-transport {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--mz-surface);
    border-bottom: 1px solid var(--mz-border);
    gap: 24px;
}

.mzk-transport__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.mzk-transport__art {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--mz-gold);
    flex-shrink: 0;
}

.mzk-transport__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mzk-transport__center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.mzk-transport__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mzk-transport__right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    justify-content: flex-end;
}

/* Mode tabs at bottom center */
.mzk-mode-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    border-top: 1px solid var(--mz-border);
    background: var(--mz-bg);
}

.mzk-mode-btn {
    padding: 8px 16px;
    border: 1px solid var(--mz-border);
    background: transparent;
    color: var(--mz-text-dim);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 4px;
}

.mzk-mode-btn:hover {
    border-color: var(--mz-gold);
    color: var(--mz-text);
}

.mzk-mode-btn.active {
    background: var(--mz-gold);
    border-color: var(--mz-gold);
    color: var(--mz-bg);
}

/* Section button looping state with rotating circle */
.muzeark-section-btn.looping {
    position: relative;
}

.muzeark-section-btn.looping::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: var(--mz-gold);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: spin-loop 0.8s linear infinite;
}

@keyframes spin-loop {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Section playing state */
.muzeark-section-btn.playing {
    background: var(--mz-gold-dim) !important;
    border-color: var(--mz-gold) !important;
}

/* ============================================ */
/* === v3.82.27 - SECTION LAYOUT FIXES === */
/* ============================================ */

/* Hide section header in writing area - moved to bottom stats */
.wp-section-head {
    display: none !important;
}

/* Section name in stats bar */
.wp-current-section-name {
    font-weight: 700;
    color: var(--mz-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wp-stats-divider {
    color: var(--mz-text-dim);
    opacity: 0.5;
}

/* Section tabs - spread across full width */
.muzeark-writing-pad__sections {
    display: flex;
    width: 100%;
    gap: 0;
}

.muzeark-section-btn {
    flex: 1;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    border-left: none;
    color: var(--mz-text-dim);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.muzeark-section-btn:first-child {
    border-left: 1px solid var(--mz-border);
    border-radius: 6px 0 0 6px;
}

.muzeark-section-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.muzeark-section-btn:hover {
    background: var(--mz-surface2);
    color: var(--mz-text);
}

.muzeark-section-btn.active {
    background: var(--mz-gold);
    border-color: var(--mz-gold);
    color: #000;
    font-weight: 800;
}

/* Section PLAYING state - blink animation */
.muzeark-section-btn.playing {
    animation: section-blink 0.8s ease-in-out infinite;
}

@keyframes section-blink {
    0%, 100% { 
        background: var(--mz-surface);
        border-color: var(--mz-gold);
        color: var(--mz-gold);
    }
    50% { 
        background: rgba(226, 186, 135, 0.25);
        border-color: var(--mz-gold);
        color: var(--mz-gold);
    }
}

/* When active AND playing, pulse glow animation */
.muzeark-section-btn.active.playing {
    animation: section-pulse-active 1s ease-in-out infinite;
}

@keyframes section-pulse-active {
    0%, 100% { 
        background: var(--mz-gold);
        color: #000;
        box-shadow: 0 0 0 0 rgba(226, 186, 135, 0.4);
    }
    50% { 
        background: #f5d4a8;
        color: #000;
        box-shadow: 0 0 12px 4px rgba(226, 186, 135, 0.6);
    }
}

/* Section LOOPING state - rotating circle */
.muzeark-section-btn.looping::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 6px;
    width: 10px;
    height: 10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: spin-loop 0.6s linear infinite;
}

/* Section nav container */
.muzeark-writing-pad__nav {
    padding: 12px 16px;
    background: var(--mz-bg);
    border-bottom: 1px solid var(--mz-border);
}

/* ============================================ */
/* === v3.82.28 - HIDE TOP CONTRACT BAR === */
/* ============================================ */

/* Hide the top notification bar - keep sidebar notification */
.mzk-notif-bar {
    display: none !important;
}

/* ============================================ */
/* === v3.82.33 - SMART SEARCH FILTERS === */
/* ============================================ */

/* Smart search toggle button */
.mzk-smart-search-toggle {
    background: transparent;
    border: none;
    color: var(--mz-text-dim);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mzk-smart-search-toggle:hover {
    background: var(--mz-surface2);
    color: var(--mz-gold);
}

.mzk-smart-search-toggle.active {
    background: var(--mz-gold-dim);
    color: var(--mz-gold);
}

/* Elite filter toggle button */
.mzk-elite-filter-toggle {
    background: transparent;
    border: none;
    color: var(--mz-text-dim);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0.6;
}

.mzk-elite-filter-toggle:hover {
    background: rgba(226, 186, 135, 0.1);
    opacity: 1;
}

.mzk-elite-filter-toggle.active {
    background: rgba(226, 186, 135, 0.2);
    opacity: 1;
}

.mzk-elite-filter-toggle.active .mzk-elite-crown {
    animation: crown-pulse 1.5s ease-in-out infinite;
}

@keyframes crown-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Smart filters panel */
.mzk-smart-filters {
    background: var(--mz-surface);
    border-top: 1px solid var(--mz-border);
    padding: 12px 16px;
    max-height: 300px;
    overflow-y: auto;
    animation: slideUp 0.2s ease-out;
}

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

.mzk-smart-filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mzk-smart-filters__title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--mz-text-muted);
}

.mzk-smart-filters__clear {
    background: transparent;
    border: none;
    color: var(--mz-text-dim);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.mzk-smart-filters__clear:hover {
    background: var(--mz-surface2);
    color: var(--mz-gold);
}

/* Filter dimensions */
.mzk-smart-filters__dims {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mzk-filter-dim {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mzk-filter-dim__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--mz-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mzk-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mzk-filter-chip {
    padding: 6px 12px;
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 16px;
    font-size: 12px;
    color: var(--mz-text-dim);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.mzk-filter-chip:hover {
    border-color: var(--mz-gold);
    color: var(--mz-text);
}

.mzk-filter-chip.active {
    background: var(--mz-gold-dim);
    border-color: var(--mz-gold);
    color: var(--mz-gold);
}

.mzk-filter-chip__count {
    font-size: 10px;
    opacity: 0.6;
    margin-left: 4px;
}

/* Chip pulse animation (RNG discovery) */
.mzk-filter-chip.pulse {
    animation: chipPulse 0.5s ease-out;
}

@keyframes chipPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(226, 186, 135, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(226, 186, 135, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(226, 186, 135, 0); }
}

/* Active filters bar */
.mzk-smart-filters__active {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--mz-border);
    flex-wrap: wrap;
}

.mzk-smart-filters__active-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--mz-text-muted);
    text-transform: uppercase;
}

.mzk-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mzk-active-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--mz-gold);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mz-bg);
}

.mzk-active-chip__remove {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.mzk-active-chip__remove:hover {
    opacity: 1;
}

/* Filter loading */
.mzk-filter-loading {
    font-size: 12px;
    color: var(--mz-text-muted);
    padding: 20px;
    text-align: center;
}

/* Expand/collapse for dimensions with many chips */
.mzk-filter-dim.collapsed .mzk-filter-chips {
    max-height: 70px;
    overflow: hidden;
    position: relative;
}

.mzk-filter-dim.collapsed .mzk-filter-chips::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, var(--mz-surface));
    pointer-events: none;
}

.mzk-filter-dim__toggle {
    font-size: 11px;
    color: var(--mz-gold);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-top: 4px;
}

.mzk-filter-dim__toggle:hover {
    text-decoration: underline;
}

/* ============================================ */
/* === v3.82.33 - ALIGNMENT POLISH === */
/* ============================================ */

/* Hide the section progress bar (0/8) - redundant with bottom counter */
.wp-section-prog {
    display: none !important;
}

/* Container for entire writing pad - flush edges */
.muzeark-writing-pad__content {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    margin: 0;
}

/* Section nav - flush to grid, no gap */
.muzeark-writing-pad__nav {
    padding: 0 !important;
    margin: 0;
    background: var(--mz-bg);
}

.muzeark-writing-pad__sections {
    display: flex;
    width: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--mz-border);
    border-bottom: none;
}

/* Section buttons fill space evenly */
.muzeark-section-btn {
    flex: 1;
    padding: 14px 8px;
    margin: 0;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--mz-border);
    font-size: 11px;
    background: var(--mz-surface);
}

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

.muzeark-section-btn.active {
    background: var(--mz-gold);
    color: var(--mz-bg);
}

/* Writing grid container - flush with section tabs */
#wp-grid-pages,
.wp-write-view {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--mz-border);
    border-bottom: none;
    min-height: auto;
}

/* Lined paper - full width */
.wp-lined-paper {
    margin: 0;
    padding: 0;
}

/* Textarea page - no extra padding */
.wp-textarea-page {
    padding: 0 !important;
    margin: 0;
}

/* Bar rows */
.wp-bar-row {
    border-bottom: 1px solid rgba(59, 130, 246, 0.4); /* BLUE line */
    padding: 0;
    margin: 0;
}

.wp-bar-row:last-child {
    border-bottom: none;
}

/* ============================================ */
/* === COMBINED BOTTOM BAR === */
/* ============================================ */

.muzeark-writing-pad__bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--mz-border);
    background: var(--mz-surface);
    gap: 16px;
}

/* Stats on the left */
.muzeark-writing-pad__bottom-bar .muzeark-writing-pad__stats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    font-size: 12px;
    color: var(--mz-text-dim);
    flex-shrink: 0;
}

/* Mode tabs in the center */
.muzeark-writing-pad__bottom-bar .mzk-mode-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    flex-shrink: 0;
}

.mzk-mode-btn {
    padding: 8px 16px;
    border: 1px solid var(--mz-border);
    border-radius: 0;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    background: transparent;
    color: var(--mz-text-dim);
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-mode-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.mzk-mode-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.mzk-mode-btn:not(:first-child) {
    border-left: none;
}

.mzk-mode-btn:hover {
    border-color: var(--mz-gold);
    color: var(--mz-text);
}

.mzk-mode-btn.active {
    background: var(--mz-gold);
    border-color: var(--mz-gold);
    color: var(--mz-bg);
}

/* Writes badge on the right */
.muzeark-writing-pad__bottom-bar .muzeark-writing-pad__writes-badge {
    margin-left: auto;
    flex-shrink: 0;
}


/* ============================================ */
/* === v3.82.36 - FLEX BAR HEIGHT === */
/* ============================================ */

/* Grid container - fills available space, bars expand within */
#wp-grid-pages,
.wp-write-view {
    flex: 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Textarea page - flex container for bars */
.wp-textarea-page {
    padding: 0 !important;
    margin: 0;
    display: none;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.wp-textarea-page.active {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

/* Lined paper - flex to fill */
.wp-lined-paper {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Bar rows - expand to fill, min 38px (so 16 fit without scroll) */
.wp-bar-row {
    display: flex;
    align-items: center;
    flex: 1;
    min-height: 38px;
    padding: 0 !important;
    margin: 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.4); /* BLUE line */
}

.wp-bar-row:last-child {
    border-bottom: none;
}

/* Bar number */
.wp-bar-num {
    width: 32px;
    min-width: 32px;
    text-align: center;
    font-size: 12px;
    color: var(--mz-text-dim);
    flex-shrink: 0;
    align-self: center;
    border-right: 2px solid rgba(239, 68, 68, 0.6); /* RED divider */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bar input - fills remaining space */
.wp-bar-input {
    flex: 1;
    height: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--mz-text);
    font-size: 14px;
    font-family: inherit;
    display: flex;
    align-items: center;
}

.wp-bar-input:focus {
    outline: none;
    background: rgba(226, 186, 135, 0.05);
}

.wp-bar-input::placeholder {
    color: var(--mz-text-muted);
}

/* Lightning bolt icon */
.wp-bar-bolt {
    width: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    flex-shrink: 0;
    align-self: center;
}

.wp-bar-row.complete .wp-bar-bolt {
    opacity: 1;
    color: var(--mz-green);
}

/* Custom scrollbar for writing area */
#wp-grid-pages::-webkit-scrollbar {
    width: 6px;
}

#wp-grid-pages::-webkit-scrollbar-track {
    background: var(--mz-bg);
}

#wp-grid-pages::-webkit-scrollbar-thumb {
    background: var(--mz-border);
    border-radius: 3px;
}

#wp-grid-pages::-webkit-scrollbar-thumb:hover {
    background: var(--mz-gold-dim);
}

/* ============================================ */
/* === v3.82.37 - BOTTOM BAR ATTACHED === */
/* ============================================ */

/* Writing pad content wrapper - flex column, fill space */
.muzeark-writing-pad__content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    padding: 0 !important;
}

/* Grid grows to fill available space */
#wp-grid-pages,
.wp-write-view {
    flex: 1 !important;
    height: auto !important;
    min-height: 200px !important;
    max-height: none !important;
    overflow-y: auto;
}

/* Bottom bar sticks to bottom, no gap */
.muzeark-writing-pad__bottom-bar {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    border-top: none !important;
}

/* Writing pad section - also flex */
.mzk-embedded-pad .muzeark-writing-pad__content,
.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

/* Ensure the writing area between transport and bottom fills space */
.mzk-panel--center {
    display: flex !important;
    flex-direction: column !important;
}

.mzk-panel--center .muzeark-writing-pad__content {
    flex: 1 !important;
}

/* ============================================ */
/* === v3.82.38 - FULL VERTICAL FILL === */
/* ============================================ */

/* The embedded pad should fill between transport and footer */
.muzeark-writing-pad.mzk-embedded-pad {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

/* Nav (section tabs) - fixed height */
.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__nav {
    flex-shrink: 0 !important;
}

/* Content fills remaining space */
.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Grid fills available space within content */
.muzeark-writing-pad.mzk-embedded-pad #wp-grid-pages {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
}

/* Bottom bar at end of content, no grow */
.muzeark-writing-pad.mzk-embedded-pad .muzeark-writing-pad__bottom-bar {
    flex-shrink: 0 !important;
    margin-top: 0 !important;
}

/* Footer stays at bottom */
.mzk-pad-footer {
    flex-shrink: 0 !important;
}

/* ============================================ */
/* ===  MOBILE RESPONSIVE (max-width: 768px) === */
/* ============================================ */
@media (max-width: 768px) {
    
    /* === LAYOUT RESTRUCTURE === */
    .muzeark-app {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        overflow: hidden;
    }
    
    /* Hide desktop sidebar */
    .muzeark-sidebar--slim {
        display: none !important;
    }
    
    /* Hide desktop beat panel - it becomes a drawer */
    .mzk-beat-panel {
        display: none !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100% !important;
        max-height: 75vh;
        background: var(--mz-surface);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
        transform: translateY(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        flex-direction: column;
    }
    
    .mzk-beat-panel.drawer-open {
        display: flex !important;
        transform: translateY(0);
    }
    
    /* Center panel fills entire viewport */
    .mzk-center-panel {
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-height: 0;
        padding-bottom: 60px; /* Space for bottom nav */
    }
    
    /* === MOBILE TRANSPORT BAR (Compact Single Row) === */
    .mzk-transport {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        background: linear-gradient(180deg, #141414 0%, var(--mz-surface) 100%);
    }
    
    .mzk-transport__left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    
    .mzk-transport__art {
        width: 36px !important;
        height: 36px !important;
        border-radius: 4px;
        flex-shrink: 0;
    }
    
    .mzk-transport__art img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
    
    .mzk-transport__info {
        flex: 1;
        min-width: 0;
    }
    
    .mzk-transport__title {
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mzk-transport__artist {
        font-size: 10px !important;
        display: none !important; /* Hide artist on mobile to save space */
    }
    
    /* Show controls on right side */
    .mzk-transport__center {
        display: flex !important;
        flex-shrink: 0;
        order: 2;
    }
    
    .mzk-transport__controls {
        display: flex !important;
        align-items: center;
        gap: 2px;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .mzk-ctrl-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 10px !important;
        background: transparent !important;
        border: none !important;
        color: var(--mz-text-dim);
    }
    
    .mzk-ctrl-btn--play {
        width: 32px !important;
        height: 32px !important;
        background: var(--mz-gold) !important;
        color: var(--mz-bg) !important;
        border-radius: 50% !important;
        font-size: 12px !important;
    }
    
    /* Loop button - keep visible but smaller */
    #wp-loop-toggle {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
    }
    
    /* Hide desktop right section */
    .mzk-transport__right {
        display: none !important;
    }
    
    /* === SECTION TABS (Compact Horizontal Scroll) === */
    .muzeark-writing-pad__nav {
        background: var(--mz-surface);
        border-bottom: 1px solid var(--mz-border);
        flex-shrink: 0;
        overflow: hidden;
    }
    
    .muzeark-writing-pad__sections {
        display: flex !important;
        gap: 4px;
        padding: 6px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap !important;
    }
    
    .muzeark-writing-pad__sections::-webkit-scrollbar {
        display: none;
    }
    
    .wp-section-tab {
        padding: 6px 10px !important;
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 10px !important;
        min-width: auto !important;
    }
    
    /* === WRITING AREA === */
    .muzeark-writing-pad__content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 12px !important;
    }
    
    .muzeark-writing-pad__title-row {
        display: none !important; /* Hide on mobile - title is in transport */
    }
    
    .wp-grid-pages {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile line rows */
    .wp-line-row {
        padding: 8px 0 !important;
    }
    
    .wp-line-num {
        width: 24px !important;
        font-size: 11px !important;
    }
    
    .wp-line-input {
        font-size: 15px !important;
        padding: 8px !important;
    }
    
    .wp-line-rhyme {
        width: 20px !important;
        font-size: 10px !important;
    }
    
    /* === MOBILE BOTTOM BAR (Compact) === */
    .muzeark-writing-pad__bottom-bar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 8px 12px !important;
        background: var(--mz-surface);
        border-top: 1px solid var(--mz-border);
    }
    
    .muzeark-writing-pad__stats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 4px !important;
        font-size: 10px !important;
        white-space: nowrap !important;
        color: var(--mz-text-dim);
    }
    
    .muzeark-writing-pad__stats > * {
        display: inline !important;
    }
    
    .wp-stats-divider {
        display: inline !important;
        margin: 0 2px !important;
    }
    
    .wp-current-section-name {
        font-weight: 700;
        color: var(--mz-gold);
    }
    
    .mzk-mode-tabs {
        display: none !important; /* Old bottom mode tabs - removed */
    }
    
    /* Mobile Mode Tabs Bar (Top) */
    .mzk-mode-tabs-bar {
        padding: 8px 12px;
    }
    
    .mzk-mode-tabs-bar .mzk-mode-tabs {
        display: flex !important;
        width: 100%;
        justify-content: center;
    }
    
    .mzk-mode-tabs-bar .mzk-mode-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 11px;
        text-align: center;
    }
    
    /* === MOBILE EXPORT BAR === */
    .mzk-export-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 12px;
    }
    
    .mzk-export-bar__stats {
        gap: 16px;
        justify-content: center;
        width: 100%;
    }
    
    .mzk-export-bar__stat {
        align-items: center;
    }
    
    .mzk-export-bar__value {
        font-size: 14px;
    }
    
    .mzk-export-bar__label {
        font-size: 8px;
    }
    
    .mzk-export-bar__actions {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .mzk-export-bar__btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 11px;
    }
    
    /* Hide transport meta on mobile - too cramped */
    .mzk-transport__meta {
        display: none !important;
    }
    
    /* Hide click button on mobile */
    .mzk-ctrl-btn--click {
        display: none !important;
    }
    
    /* Record button on mobile */
    .mzk-ctrl-btn--record {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
    
    /* Hide time display on mobile */
    .mzk-transport__time {
        display: none !important;
    }
    
    /* Writes badge inline */
    .muzeark-writing-pad__writes-badge {
        margin: 0 !important;
        padding: 4px 10px !important;
        font-size: 9px !important;
        flex-shrink: 0;
    }
    
    /* === MOBILE BOTTOM NAVIGATION === */
    .mzk-mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--mz-surface);
        border-top: 1px solid var(--mz-border);
        z-index: 999;
        padding: 6px 0;
        padding-bottom: env(safe-area-inset-bottom, 6px);
    }
    
    .mzk-mobile-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--mz-text-muted);
        text-decoration: none;
        cursor: pointer;
        position: relative;
        transition: color 0.2s;
    }
    
    .mzk-mobile-nav__item.active {
        color: var(--mz-gold);
    }
    
    .mzk-mobile-nav__icon {
        font-size: 20px;
        line-height: 1;
    }
    
    .mzk-mobile-nav__label {
        font-size: 10px;
        font-weight: 600;
    }
    
    .mzk-mobile-nav__badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 18px);
        background: var(--mz-gold);
        color: var(--mz-bg);
        font-size: 9px;
        font-weight: 800;
        padding: 1px 5px;
        border-radius: 10px;
        min-width: 16px;
        text-align: center;
    }
    
    /* === DRAWER OVERLAY === */
    .mzk-drawer-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .mzk-drawer-overlay.open {
        display: block;
        opacity: 1;
    }
    
    /* === BEATS DRAWER === */
    .mzk-beat-panel.drawer-open {
        overflow: hidden;
    }
    
    .mzk-drawer-handle {
        width: 40px;
        height: 4px;
        background: var(--mz-border-light);
        border-radius: 2px;
        margin: 10px auto;
        flex-shrink: 0;
    }
    
    .mzk-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px 12px;
        border-bottom: 1px solid var(--mz-border);
        flex-shrink: 0;
    }
    
    .mzk-drawer-title {
        font-size: 16px;
        font-weight: 700;
    }
    
    .mzk-drawer-close {
        width: 32px;
        height: 32px;
        background: var(--mz-surface2);
        border: none;
        border-radius: 50%;
        font-size: 20px;
        color: var(--mz-text-dim);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Beat list in drawer */
    .mzk-beat-panel.drawer-open .mzk-beat-list-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }
    
    .mzk-beat-panel.drawer-open .mzk-beat-list-header {
        padding: 12px 16px;
        flex-shrink: 0;
    }
    
    .mzk-beat-panel.drawer-open .mzk-beat-list {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 12px 12px;
    }
    
    /* Elite bar in drawer */
    .mzk-beat-panel.drawer-open .mzk-elite-bar {
        margin: 0 12px 12px;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    /* === CART DRAWER === */
    .mzk-cart-drawer {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 70vh;
        background: var(--mz-surface);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
        transform: translateY(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        flex-direction: column;
        overflow: hidden;
    }
    
    .mzk-cart-drawer.drawer-open {
        display: flex;
        transform: translateY(0);
    }
    
    .mzk-cart-items-mobile {
        flex: 1;
        overflow-y: auto;
        padding: 12px 16px;
    }
    
    .mzk-cart-item-mobile {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--mz-border);
    }
    
    .mzk-cart-item-mobile:last-child {
        border-bottom: none;
    }
    
    .mzk-cart-item__art {
        width: 44px;
        height: 44px;
        border-radius: 6px;
        background: var(--mz-gold-dim);
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'JetBrains Mono', monospace;
        font-weight: 800;
        color: var(--mz-gold);
        flex-shrink: 0;
    }
    
    .mzk-cart-item__info {
        flex: 1;
        min-width: 0;
    }
    
    .mzk-cart-item__name {
        font-weight: 700;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mzk-cart-item__license {
        font-size: 11px;
        color: var(--mz-text-dim);
    }
    
    .mzk-cart-item__price {
        font-family: 'JetBrains Mono', monospace;
        font-weight: 700;
        font-size: 14px;
        color: var(--mz-gold);
    }
    
    .mzk-cart-item__remove {
        width: 28px;
        height: 28px;
        background: var(--mz-surface2);
        border: none;
        border-radius: 50%;
        font-size: 18px;
        color: var(--mz-text-muted);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mzk-cart-footer-mobile {
        padding: 16px;
        border-top: 1px solid var(--mz-border);
        background: var(--mz-surface2);
        flex-shrink: 0;
    }
    
    .mzk-cart-total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }
    
    .mzk-cart-total-label {
        font-size: 14px;
        color: var(--mz-text-dim);
    }
    
    .mzk-cart-total-price {
        font-family: 'JetBrains Mono', monospace;
        font-size: 20px;
        font-weight: 800;
        color: var(--mz-gold);
    }
    
    .mzk-cart-checkout-btn {
        width: 100%;
        padding: 14px;
        background: var(--mz-gold);
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 800;
        color: var(--mz-bg);
        cursor: pointer;
        margin-bottom: 10px;
    }
    
    .mzk-cart-elite-upsell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        color: var(--mz-text-dim);
    }
    
    .mzk-cart-elite-upsell a {
        color: var(--mz-gold);
        text-decoration: none;
    }
    
    /* === FOCUS MODE (Keyboard Open) === */
    .muzeark-app.focus-mode .mzk-transport {
        display: none !important;
    }
    
    .muzeark-app.focus-mode .mzk-mobile-nav {
        display: none !important;
    }
    
    .muzeark-app.focus-mode .muzeark-writing-pad__nav {
        display: none !important;
    }
    
    .muzeark-app.focus-mode .muzeark-writing-pad__bottom-bar {
        display: none !important;
    }
    
    .muzeark-app.focus-mode .mzk-center-panel {
        padding-bottom: 0 !important;
    }
    
    /* Focus mode exit button */
    .mzk-focus-exit {
        display: none;
        position: fixed;
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        background: var(--mz-gold);
        border: none;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 700;
        color: var(--mz-bg);
        cursor: pointer;
        z-index: 1001;
    }
    
    .muzeark-app.focus-mode .mzk-focus-exit {
        display: block;
    }
    
    /* Focused line highlight */
    .wp-line-row.focused {
        background: var(--mz-gold-dim);
        border-radius: 6px;
    }
    
    .wp-line-row.focused .wp-line-input {
        background: transparent;
    }
    
    /* === HIDE DESKTOP ELEMENTS === */
    .mzk-pad-footer {
        display: none !important;
    }
    
    .muzeark-mobile-menu {
        /* Keep existing mobile menu styles */
    }
    
    /* === EMBEDDED PAD ADJUSTMENTS === */
    .muzeark-writing-pad.mzk-embedded-pad {
        border-radius: 0 !important;
        border: none !important;
    }
    
    /* === NOTIFICATION BAR MOBILE === */
    .mzk-notif-bar {
        margin: 8px 12px !important;
        padding: 10px 14px !important;
        font-size: 12px !important;
    }
    
    /* === BEAT ITEM MOBILE TWEAKS === */
    .mzk-beat-item {
        padding: 10px !important;
    }
    
    .mzk-beat-item__art {
        width: 48px !important;
        height: 48px !important;
    }
    
    .mzk-beat-item__name {
        font-size: 13px !important;
    }
    
    .mzk-beat-item__meta {
        font-size: 11px !important;
    }
    
    /* Add beat button in drawer */
    .mzk-beat-item__add-btn {
        padding: 8px 12px;
        background: var(--mz-gold-dim);
        border: 1px solid var(--mz-gold);
        border-radius: 6px;
        font-size: 11px;
        font-weight: 700;
        color: var(--mz-gold);
        cursor: pointer;
        white-space: nowrap;
    }
    
    /* === SEARCH IN DRAWER === */
    .mzk-drawer-search {
        padding: 0 12px 12px;
        flex-shrink: 0;
    }
    
    .mzk-drawer-search__input {
        width: 100%;
        padding: 10px 14px;
        background: var(--mz-bg);
        border: 1px solid var(--mz-border);
        border-radius: 8px;
        font-size: 14px;
        color: var(--mz-text);
        outline: none;
    }
    
    .mzk-drawer-search__input::placeholder {
        color: var(--mz-text-muted);
    }
    
    .mzk-drawer-search__input:focus {
        border-color: var(--mz-gold);
    }
}

/* === TABLET BREAKPOINT (768px - 1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
    .muzeark-app {
        grid-template-columns: 60px 1fr 300px !important;
    }
    
    .muzeark-sidebar--slim {
        width: 60px !important;
        padding: 16px 8px !important;
    }
    
    .muzeark-sidebar__logo {
        font-size: 0 !important;
    }
    
    .muzeark-sidebar__logo::first-letter {
        font-size: 18px !important;
    }
    
    .muzeark-nav__item span:not(.muzeark-nav__icon) {
        display: none !important;
    }
    
    .muzeark-nav__icon {
        margin-right: 0 !important;
    }
    
    .mzk-beat-panel {
        width: 300px !important;
    }
}

/* === HIDE MOBILE NAV ON DESKTOP === */
@media (min-width: 769px) {
    .mzk-mobile-nav,
    .mzk-drawer-overlay,
    .mzk-cart-drawer,
    .mzk-focus-exit,
    .mzk-drawer-handle,
    .mzk-drawer-header,
    .mzk-drawer-search {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DAW PANEL STYLES (Record Mode)
   ═══════════════════════════════════════════════════════════════ */

.mzk-daw-panel {
    display: none;
    flex-direction: column;
    background: var(--mz-bg);
    flex: 1;
    overflow: hidden;
}

/* Preview Banner */
.mzk-daw-preview-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #7c2d12, #9a3412);
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}

.mzk-daw-preview-badge {
    background: var(--mz-orange);
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
}

.mzk-daw-preview-text strong {
    color: var(--mz-orange);
}

/* Timeline Header */
.mzk-daw-timeline {
    display: flex;
    border-bottom: 1px solid var(--mz-border);
    background: var(--mz-surface);
    flex-shrink: 0;
}

.mzk-daw-timeline__label {
    width: 140px;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    color: var(--mz-text-muted);
    letter-spacing: 0.5px;
    border-right: 1px solid var(--mz-border);
    flex-shrink: 0;
}

.mzk-daw-timeline__ruler {
    flex: 1;
    display: flex;
    overflow-x: hidden;
}

.mzk-daw-timeline__section {
    padding: 8px 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--mz-text-dim);
    border-right: 1px solid var(--mz-border);
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mzk-daw-timeline__section:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--mz-text);
}

.mzk-daw-timeline__section.active {
    background: var(--mz-orange-dim);
    color: var(--mz-orange);
}

/* Track Lanes - FILL AVAILABLE SPACE */
.mzk-daw-tracks {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

.mzk-daw-track {
    display: flex;
    border-bottom: 1px solid var(--mz-border);
    flex: 1;
    min-height: 80px;
}

.mzk-daw-track--beat {
    background: rgba(249, 115, 22, 0.05);
}

.mzk-daw-track__controls {
    width: 140px;
    padding: 12px;
    border-right: 1px solid var(--mz-border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mzk-daw-track__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mzk-daw-track__color {
    width: 4px;
    height: 24px;
    border-radius: 2px;
}

.mzk-daw-track__name {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: var(--mz-text);
}

.mzk-daw-track__btns {
    display: flex;
    gap: 4px;
}

.mzk-daw-track__btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--mz-border);
    border-radius: 4px;
    background: transparent;
    color: var(--mz-text-muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.mzk-daw-track__btn:hover {
    border-color: var(--mz-text-dim);
    color: var(--mz-text);
}

.mzk-daw-track__btn--mute.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.mzk-daw-track__btn--solo.active {
    background: #eab308;
    border-color: #eab308;
    color: #000;
}

.mzk-daw-track__btn--arm.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    animation: pulse-arm 1.5s infinite;
}

@keyframes pulse-arm {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.mzk-daw-track__volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.mzk-daw-volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--mz-border);
    border-radius: 2px;
    cursor: pointer;
}

.mzk-daw-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--mz-orange);
    cursor: pointer;
}

.mzk-daw-volume-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--mz-text-dim);
    min-width: 35px;
    text-align: right;
}

/* Waveform Area - BIGGER */
.mzk-daw-track__waveform {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}

.mzk-daw-waveform-canvas {
    width: 100%;
    height: 100%;
    min-height: 60px;
}

.mzk-daw-track__empty {
    color: var(--mz-text-muted);
    font-size: 12px;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 1px dashed var(--mz-border);
    border-radius: 4px;
}

/* Tracks Wrapper - contains global playhead */
.mzk-daw-tracks-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Global Playhead - spans all tracks */
.mzk-daw-playhead-global {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--mz-orange);
    left: 140px; /* Start at controls width */
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
}

.mzk-daw-playhead-global::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 12px;
    height: 12px;
    background: var(--mz-orange);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* Old playhead (kept for compatibility) */
.mzk-daw-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--mz-orange);
    left: 0;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
}

.mzk-daw-playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 12px;
    height: 12px;
    background: var(--mz-orange);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* Effects Panel - COLLAPSIBLE */
.mzk-daw-effects {
    background: var(--mz-surface);
    border-top: 1px solid var(--mz-border);
    flex-shrink: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mzk-daw-effects.collapsed {
    max-height: 44px;
}

.mzk-daw-effects.collapsed .mzk-daw-effects__grid {
    display: none;
}

.mzk-daw-effects.collapsed .mzk-daw-effects__toggle-icon {
    transform: rotate(180deg);
}

.mzk-daw-effects__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
}

.mzk-daw-effects__header:hover {
    background: rgba(255,255,255,0.02);
}

.mzk-daw-effects__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--mz-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mzk-daw-effects__toggle-icon {
    width: 16px;
    height: 16px;
    color: var(--mz-text-muted);
    transition: transform 0.2s;
}

.mzk-daw-effects__preset {
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--mz-text);
    cursor: pointer;
}

.mzk-daw-effects__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 0 16px 12px;
}

/* Effect Card */
.mzk-daw-effect {
    background: var(--mz-bg);
    border: 1px solid var(--mz-border);
    border-radius: 8px;
    padding: 10px;
    opacity: 0.5;
    transition: all 0.2s;
}

.mzk-daw-effect.active {
    opacity: 1;
    border-color: var(--mz-orange);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.2);
}

.mzk-daw-effect__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.mzk-daw-effect__name {
    font-size: 11px;
    font-weight: 700;
    color: var(--mz-text);
}

.mzk-daw-effect__toggle {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: var(--mz-border);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.mzk-daw-effect__toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mz-text-dim);
    transition: all 0.2s;
}

.mzk-daw-effect__toggle.on {
    background: var(--mz-orange);
}

.mzk-daw-effect__toggle.on::after {
    left: 18px;
    background: #fff;
}

/* Knobs */
.mzk-daw-effect__knobs {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.mzk-daw-knob-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mzk-daw-knob {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid var(--mz-border);
    position: relative;
    cursor: pointer;
}

.mzk-daw-knob::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    width: 2px;
    height: 8px;
    background: var(--mz-orange);
    transform-origin: center 12px;
    transform: translateX(-50%) rotate(var(--rotation, 0deg));
}

.mzk-daw-knob-label {
    font-size: 8px;
    font-weight: 600;
    color: var(--mz-text-muted);
    letter-spacing: 0.3px;
}

.mzk-daw-knob-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--mz-orange);
}

/* DAW Export Bar */
.mzk-daw-export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--mz-surface);
    border-top: 1px solid var(--mz-border);
}

/* ═══════════════════════════════════════════════════════════════
   DAW MOBILE STYLES
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .mzk-daw-preview-banner {
        flex-direction: column;
        gap: 6px;
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .mzk-daw-timeline__label {
        width: 100px;
        padding: 6px 8px;
        font-size: 9px;
    }
    
    .mzk-daw-track__controls {
        width: 100px;
        padding: 8px;
    }
    
    .mzk-daw-track__name {
        font-size: 11px;
    }
    
    .mzk-daw-track__btn {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    
    .mzk-daw-effects__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .mzk-daw-effect {
        padding: 8px;
    }
    
    .mzk-daw-effect__knobs {
        display: none; /* Hide knobs on mobile - too small */
    }
    
    .mzk-daw-export-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .mzk-daw-export-bar .mzk-export-bar__stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .mzk-daw-export-bar .mzk-export-bar__actions {
        width: 100%;
    }
}

/* Export Demo Button */
.mzk-export-bar__btn--export {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    display: none; /* Hidden by default, shown in Record mode */
}

.mzk-export-bar__btn--export:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.mzk-export-bar__btn--export:disabled {
    background: var(--mz-border);
    color: var(--mz-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* DAW Panel inside content - flex child */
.muzeark-writing-pad__content .mzk-daw-panel {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: var(--mz-bg);
}

/* Remove old standalone styling */
.mzk-daw-panel {
    background: transparent;
}

/* Ensure tracks area scrolls */
.mzk-daw-tracks {
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
}

/* ═══════════════════════════════════════════════════════════════
   DAW RECORDING STATES
   ═══════════════════════════════════════════════════════════════ */

/* Mic Status Indicator */
.mzk-daw-mic-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    margin: 8px;
    transition: all 0.3s ease;
}

.mzk-daw-mic-status.connected {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.mzk-daw-mic-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.mzk-daw-mic-status.waiting {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Track recording state */
.mzk-daw-track.recording {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5), 
                inset 0 0 20px rgba(239, 68, 68, 0.1);
}

.mzk-daw-track.recording .mzk-daw-track__name {
    color: #ef4444;
}

/* Arm button when recording */
.mzk-daw-track.recording .mzk-daw-track__btn--arm {
    background: #ef4444 !important;
    animation: pulse-recording 1s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); 
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); 
    }
}

/* Playhead recording state */
.mzk-daw-playhead.recording {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.mzk-daw-playhead.recording::before {
    border-bottom-color: #ef4444;
}

/* Armed track states */
.mzk-daw-track__btn--arm.active {
    background: #ef4444 !important;
    color: white !important;
    animation: blink-arm 1.5s ease-in-out infinite;
}

@keyframes blink-arm {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Recording waveform animation */
.mzk-daw-recording-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
}

.mzk-daw-recording-waveform span {
    width: 3px;
    background: currentColor;
    border-radius: 2px;
    animation: waveform-bar 0.5s ease-in-out infinite;
}

.mzk-daw-recording-waveform span:nth-child(1) { animation-delay: 0s; height: 40%; }
.mzk-daw-recording-waveform span:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.mzk-daw-recording-waveform span:nth-child(3) { animation-delay: 0.2s; height: 50%; }
.mzk-daw-recording-waveform span:nth-child(4) { animation-delay: 0.3s; height: 80%; }
.mzk-daw-recording-waveform span:nth-child(5) { animation-delay: 0.4s; height: 30%; }

@keyframes waveform-bar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

/* ═══════════════════════════════════════════════════════════════
   DAW LEVEL METER
   ═══════════════════════════════════════════════════════════════ */

.mzk-daw-level-meter {
    display: none;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin: 0 16px 8px;
    overflow: hidden;
}

.mzk-daw-level-meter__bar {
    height: 100%;
    width: 0%;
    background: #22c55e;
    border-radius: 4px;
    transition: width 0.05s ease-out;
}

/* ═══════════════════════════════════════════════════════════════
   DAW TRANSPORT BAR
   ═══════════════════════════════════════════════════════════════ */

.mzk-daw-transport {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--mz-border);
}

.mzk-daw-transport__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--mz-border);
    background: transparent;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mzk-daw-transport__btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.mzk-daw-transport__btn:active {
    transform: scale(0.95);
}

.mzk-daw-transport__record {
    border-color: #ef4444;
}

.mzk-daw-transport__record::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ef4444;
    transition: all 0.2s;
}

.mzk-daw-transport__record:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #f87171;
}

.mzk-daw-transport__record:hover::after {
    background: #f87171;
}

.mzk-daw-transport__record.active {
    background: rgba(239, 68, 68, 0.2);
    animation: pulse-record-btn 1s ease-in-out infinite;
}

.mzk-daw-transport__record.active::after {
    border-radius: 3px;
    width: 12px;
    height: 12px;
}

@keyframes pulse-record-btn {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Export ready state */
.mzk-export-bar__btn--export:not(:disabled) {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    animation: export-ready 2s ease-in-out infinite;
}

@keyframes export-ready {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}

/* Mobile adjustments for DAW recording */
@media (max-width: 768px) {
    .mzk-daw-mic-status {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .mzk-daw-transport {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .mzk-daw-transport__btn {
        width: 32px;
        height: 32px;
    }
    
    .mzk-daw-transport__record::after {
        width: 12px;
        height: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PANEL COLLAPSE TOGGLES
   ═══════════════════════════════════════════════════════════════ */

.mzk-panel-toggle {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 24px;
    height: 48px;
    background: var(--mz-surface);
    border: 1px solid var(--mz-border);
    color: var(--mz-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mzk-panel-toggle:hover {
    background: var(--mz-bg);
    color: var(--mz-orange);
    border-color: var(--mz-orange);
}

.mzk-panel-toggle--left {
    left: 180px;
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.mzk-panel-toggle--right {
    right: 340px;
    border-radius: 6px 0 0 6px;
    border-right: none;
}

/* Collapsed states - LEFT panel hidden */
.muzeark-app.left-collapsed {
    grid-template-columns: 0 1fr 340px !important;
}

.muzeark-app.left-collapsed .muzeark-sidebar {
    width: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    pointer-events: none;
}

.muzeark-app.left-collapsed .mzk-panel-toggle--left {
    left: 0;
}

.muzeark-app.left-collapsed .mzk-panel-toggle--left svg {
    transform: rotate(180deg);
}

/* Collapsed states - RIGHT panel hidden */
.muzeark-app.right-collapsed {
    grid-template-columns: 180px 1fr 0 !important;
}

.muzeark-app.right-collapsed .mzk-beat-panel {
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    pointer-events: none;
}

.muzeark-app.right-collapsed .mzk-panel-toggle--right {
    right: 0;
}

.muzeark-app.right-collapsed .mzk-panel-toggle--right svg {
    transform: rotate(180deg);
}

/* BOTH panels collapsed */
.muzeark-app.left-collapsed.right-collapsed {
    grid-template-columns: 0 1fr 0 !important;
}

/* Smooth transitions */
.muzeark-app {
    transition: grid-template-columns 0.3s ease;
}

.muzeark-sidebar,
.mzk-beat-panel {
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

/* Adjust toggle positions when collapsed */
.muzeark-app.left-collapsed .mzk-panel-toggle--right {
    /* Keep right toggle in same position relative to beat panel */
}

.muzeark-app.right-collapsed .mzk-panel-toggle--left {
    /* Keep left toggle in same position relative to sidebar */
}

/* Hide toggles on mobile */
@media (max-width: 1024px) {
    .mzk-panel-toggle {
        display: none;
    }
}

/* Hide toggles when in Library or Projects view */
.muzeark-app[data-view="library"] .mzk-panel-toggle,
.muzeark-app[data-view="projects"] .mzk-panel-toggle {
    display: none;
}
