/* Focus-guided Compose workspace — StepSeqPoly 1.3 */
body.focus-guided-ui .controls {
    justify-content: flex-start;
}

body.focus-guided-ui .controls .pattern-group {
    order: 10;
    flex: 1 0 100%;
    justify-content: flex-start;
    box-sizing: border-box;
}

body.focus-guided-ui .controls .right-controls {
    margin-left: auto;
}

body.focus-guided-ui #view-seq {
    overflow: hidden;
}

.focus-workspace {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr) 222px;
    gap: 10px;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.focus-track-rail,
.focus-overview,
.focus-editor-stage {
    min-height: 0;
    border: 1px solid #30303a;
    border-radius: 9px;
    background: #141418;
    box-sizing: border-box;
}

.focus-track-rail,
.focus-overview {
    padding: 12px;
}

.focus-track-rail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.focus-eyebrow {
    display: block;
    color: #6f6f7e;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.focus-rail-heading strong,
.focus-overview-heading strong {
    display: block;
    margin-top: 3px;
    color: #f3f3f7;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.focus-rail-heading small {
    display: block;
    margin-top: 4px;
    color: #787887;
    font-size: 9px;
}

.focus-track-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.focus-track-button {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    grid-template-areas:
        "index copy"
        "index state";
    gap: 1px 8px;
    min-height: 66px;
    padding: 9px;
    border: 1px solid #383843;
    border-left: 3px solid #383843;
    border-radius: 7px;
    background: #1d1d23;
    color: #b7b7c2;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.focus-track-button:hover {
    background: #24242c;
    border-color: #555565;
}

.focus-track-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.focus-track-button.active {
    transform: translateX(2px);
    background: #202831;
    border-color: #00b0ff;
    color: #ffffff;
}

.focus-track-button[data-focus-track="synth1"].active {
    background: #2a1d2d;
    border-color: #e040fb;
}

.focus-track-button[data-focus-track="synth2"].active {
    background: #30271c;
    border-color: #ffb74d;
}

.focus-track-button.is-muted {
    opacity: 0.58;
}

.focus-track-index {
    grid-area: index;
    align-self: start;
    color: #626272;
    font-family: monospace;
    font-size: 10px;
    font-weight: 900;
}

.focus-track-copy {
    grid-area: copy;
    min-width: 0;
}

.focus-track-copy strong {
    display: block;
    color: inherit;
    font-size: 11px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.focus-track-copy small {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #81818e;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.focus-track-state {
    grid-area: state;
    color: #696978;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.focus-track-button.active .focus-track-state {
    color: #00e676;
}

.focus-rail-tip {
    margin-top: auto;
    padding: 10px;
    border: 1px solid #30303a;
    border-radius: 7px;
    background: #19191f;
}

.focus-rail-tip span {
    color: #00e676;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.focus-rail-tip p,
.focus-overview-note,
.focus-next-step p {
    margin: 6px 0 0;
    color: #858592;
    font-size: 9px;
    line-height: 1.45;
}

.focus-editor-stage {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #111115;
}

.focus-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 62px;
    padding: 10px 13px;
    border-bottom: 1px solid #30303a;
    background: linear-gradient(90deg, #18181e, #141419);
    box-sizing: border-box;
}

.focus-editor-header h1 {
    margin: 2px 0 0;
    color: #00b0ff;
    font-size: 15px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

body[data-focus-editor="synth1"] .focus-editor-header h1 {
    color: #e040fb;
}

body[data-focus-editor="synth2"] .focus-editor-header h1 {
    color: #ffb74d;
}

.focus-editor-header p {
    margin: 4px 0 0;
    color: #7d7d8b;
    font-size: 9px;
}

.focus-editor-count {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid #3a3a45;
    border-radius: 4px;
    color: #858594;
    font-family: monospace;
    font-size: 9px;
}

body.focus-guided-ui #view-seq .workspace-grid {
    display: block !important;
    flex: 1;
    min-height: 0;
    height: 100%;
    padding: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

body.focus-guided-ui #view-seq .workspace-grid > .panel {
    width: 100%;
    height: 100% !important;
    min-height: 0;
}

body.focus-guided-ui #view-seq .workspace-grid > .panel[hidden] {
    display: none !important;
}

body.focus-guided-ui #view-seq .panel-header-row {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

body.focus-guided-ui #view-seq .panel-header-row .header-left {
    flex: 1 0 auto;
    min-width: max-content;
}

body.focus-guided-ui #view-seq .panel-header-row .drum-tools-row,
body.focus-guided-ui #view-seq .panel-header-row .bass-tools-row {
    flex: 0 0 auto;
}

body.focus-guided-ui #view-seq .editor-inline-controls {
    flex: 0 0 auto;
    min-width: 0;
    height: 28px;
    margin: 0;
    box-sizing: border-box;
}

body.focus-guided-ui #view-seq .editor-inline-controls .group-title {
    display: none;
}

body.focus-guided-ui #view-seq .second-synth-global-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 0;
}

body.focus-guided-ui #view-seq .second-synth-global-group .master-slider {
    width: 60px;
}

body.focus-guided-ui #view-seq .drum-panel:not([hidden]) {
    display: flex !important;
}

body.focus-guided-ui #view-seq .drum-panel #drumContainer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(7, minmax(0, 1fr));
    flex: 1 1 auto;
    min-height: 300px;
    gap: 4px;
    overflow: hidden;
}

body.focus-guided-ui #view-seq .drum-panel .track-row {
    flex: none;
    min-height: 36px;
    height: auto;
    border-radius: 5px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

body.focus-guided-ui #view-seq .drum-panel .track-controls,
body.focus-guided-ui #view-seq .bass-panel .track-controls,
body.focus-guided-ui #view-seq .second-synth-panel .track-controls,
body.focus-guided-ui #view-seq .master-last-step-spacer {
    width: 86px;
}

body.focus-guided-ui #view-seq .track-controls .track-label,
body.focus-guided-ui #view-seq .track-controls .bass-transposer,
body.focus-guided-ui #view-seq .track-controls .second-transposer {
    min-width: 0;
}

body.focus-guided-ui #view-seq .drum-panel .track-row:focus {
    outline: none;
}

body.focus-guided-ui #view-seq .drum-panel .track-row.selected-drum-row {
    background: rgba(0, 176, 255, 0.08);
    box-shadow: inset 3px 0 0 #00b0ff;
}

body.focus-guided-ui #view-seq .drum-panel .track-actions {
    display: flex;
}

body.focus-guided-ui #view-seq .drum-panel .sound-controls {
    flex: 0 0 auto;
    margin: 8px 0 0;
    padding: 7px 9px;
    border: 1px solid #30303a;
    border-radius: 6px;
    background: #18181e;
}

body.focus-guided-ui #view-seq .bass-panel .track-row,
body.focus-guided-ui #view-seq .second-synth-panel .track-row {
    flex: 1 1 28px;
    min-height: 22px;
}

.focus-overview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.focus-overview-card {
    padding: 10px;
    border: 1px solid #30303a;
    border-radius: 7px;
    background: #19191f;
}

.focus-pattern-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 10px;
}

.focus-pattern-list button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #383844;
    border-radius: 5px;
    background: #202027;
    color: #777784;
    cursor: pointer;
}

.focus-pattern-list button > span {
    color: #a9a9b5;
    font-size: 12px;
    font-weight: 900;
}

.focus-pattern-list button small {
    color: #696977;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
}

.focus-pattern-list button.has-pattern {
    border-color: #286442;
}

.focus-pattern-list button.is-editing {
    box-shadow: inset 0 -2px 0 #00e676;
}

.focus-pattern-list button.is-playing {
    border-color: #00b0ff;
    background: #123044;
}

.focus-pattern-list button.is-playing > span,
.focus-pattern-list button.is-playing small {
    color: #6fd1ff;
}

.focus-pattern-list button.is-next {
    border-color: #ff9100;
    background: #382713;
}

.focus-lane-overview {
    margin-top: 0;
}

.focus-mini-steps {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-top: 11px;
}

.focus-mini-step {
    aspect-ratio: 1.3;
    border: 1px solid #34343f;
    border-radius: 2px;
    background: #24242c;
}

.focus-mini-step:nth-child(n+5):nth-child(-n+8),
.focus-mini-step:nth-child(n+13):nth-child(-n+16) {
    background: #1f1f26;
}

.focus-mini-step.is-on {
    border-color: #00b0ff;
    background: #007ab2;
}

body[data-focus-editor="synth1"] .focus-mini-step.is-on {
    border-color: #e040fb;
    background: #8b2799;
}

body[data-focus-editor="synth2"] .focus-mini-step.is-on {
    border-color: #ffb74d;
    background: #9a651f;
}

.focus-mini-step[data-state="accent"] {
    border-color: #ff5252 !important;
    background: #c4233d !important;
}

.focus-mini-step[data-state="slide"] {
    border-color: #00e5ff !important;
    background: #087c89 !important;
}

.focus-mini-step[data-state="both"],
.focus-mini-step[data-state="chord"] {
    border-color: #ffea00 !important;
    background: #8f8318 !important;
}

.focus-next-step {
    margin-top: auto;
    border-left: 2px solid #00e676;
}

.focus-next-step > strong {
    display: block;
    margin-top: 5px;
    color: #e9e9ee;
    font-size: 11px;
}

body.focus-guided-ui .bottom-tabs .tab-btn {
    width: auto;
    min-width: 118px;
    padding: 0 16px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .focus-workspace {
        grid-template-columns: 154px minmax(0, 1fr) 190px;
        gap: 7px;
    }

    .focus-track-rail,
    .focus-overview {
        padding: 8px;
    }

    .focus-track-button {
        padding: 7px;
        min-height: 60px;
    }
}

@media (max-width: 920px) {
    body.focus-guided-ui #view-seq {
        overflow-y: auto !important;
    }

    .focus-workspace {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }

    .focus-track-rail {
        flex: none;
    }

    .focus-rail-heading,
    .focus-rail-tip {
        display: none;
    }

    .focus-track-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .focus-track-button {
        min-height: 54px;
    }

    .focus-editor-stage {
        min-height: 620px;
        flex: none;
    }

    .focus-overview {
        display: grid;
        grid-template-columns: 1fr 1fr;
        overflow: visible;
        flex: none;
    }

    .focus-next-step {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1180px) {
    body.tablet-layout.focus-guided-ui .pattern-group {
        display: grid;
        grid-template-columns: auto auto minmax(300px, 1fr);
        grid-template-areas:
            "pattern-title pattern-status pattern-status"
            "pattern-edit pattern-launch pattern-actions";
        gap: 7px 10px;
        width: 100%;
        min-height: 0;
        height: auto;
        padding: 8px;
        overflow: visible;
        white-space: nowrap;
    }

    body.tablet-layout.focus-guided-ui .pattern-group > .title-pattern {
        grid-area: pattern-title;
        align-self: center;
    }

    body.tablet-layout.focus-guided-ui .pattern-status {
        grid-area: pattern-status;
        justify-content: flex-start;
        min-width: 0;
    }

    body.tablet-layout.focus-guided-ui .pattern-edit-group {
        grid-area: pattern-edit;
    }

    body.tablet-layout.focus-guided-ui .pattern-launch-group {
        grid-area: pattern-launch;
    }

    body.tablet-layout.focus-guided-ui .pattern-action-row {
        grid-area: pattern-actions;
        display: grid;
        grid-template-columns: repeat(6, minmax(48px, 1fr));
        gap: 5px;
        min-width: 0;
    }

    body.tablet-layout.focus-guided-ui .pattern-group select,
    body.tablet-layout.focus-guided-ui .btn-pattern {
        min-height: 44px;
        height: 44px;
        box-sizing: border-box;
        font-size: 11px;
    }

    body.tablet-layout.focus-guided-ui .pattern-group select {
        width: 50px;
        padding: 0 10px;
    }

    body.tablet-layout.focus-guided-ui .btn-pattern.slot-launch {
        min-width: 44px;
        padding: 0 12px;
    }

    body.tablet-layout.focus-guided-ui .primary-pattern-action {
        border-color: #00e676;
        color: #baffd4;
    }

    body.tablet-layout.focus-guided-ui .pattern-tools {
        width: 100%;
        height: 44px;
    }

    body.tablet-layout.focus-guided-ui .pattern-tools summary {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    body.tablet-layout.focus-guided-ui .pattern-tools-panel {
        top: 48px;
        right: 0;
        flex-wrap: wrap;
        width: min(420px, 82vw);
        padding: 7px;
    }

    body.tablet-layout.focus-guided-ui .pattern-tools-panel .btn-pattern {
        flex: 1 1 116px;
    }

    body.tablet-layout.focus-guided-ui #view-seq .drum-panel #drumContainer {
        grid-template-rows: repeat(7, minmax(42px, 1fr));
    }

    body.tablet-layout.focus-guided-ui #view-seq .drum-panel .track-controls,
    body.tablet-layout.focus-guided-ui #view-seq .bass-panel .track-controls,
    body.tablet-layout.focus-guided-ui #view-seq .second-synth-panel .track-controls,
    body.tablet-layout.focus-guided-ui #view-seq .master-last-step-spacer {
        width: 88px;
    }
}

@media (max-width: 640px) {
    .focus-track-list,
    .focus-overview {
        grid-template-columns: 1fr;
    }

    .focus-track-button {
        grid-template-columns: 22px minmax(0, 1fr) auto;
        grid-template-areas: "index copy state";
        align-items: center;
        min-height: 44px;
    }

    .focus-editor-header p {
        display: none;
    }

    body.focus-guided-ui .bottom-tabs .tab-btn {
        min-width: 104px;
        padding: 0 10px;
        font-size: 12px;
        letter-spacing: 0.4px;
    }

    body.focus-guided-ui #view-seq .drum-panel .track-controls,
    body.focus-guided-ui #view-seq .bass-panel .track-controls,
    body.focus-guided-ui #view-seq .second-synth-panel .track-controls,
    body.focus-guided-ui #view-seq .master-last-step-spacer {
        width: 76px;
    }
}
