.kokomorph-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 20px auto 48px;
}

.kokomorph-appbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.kokomorph-subtitle {
    color: var(--muted);
    font-size: 0.92rem;
}

.kokomorph-status {
    min-width: min(360px, 100%);
    visibility: hidden;
}

.kokomorph-status-text {
    min-height: 22px;
    color: var(--muted);
    font-family: "base_font", system-ui, sans-serif;
    font-size: 0.9rem;
}

.kokomorph-main {
    margin-top: 14px;
}

.kokomorph-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
    gap: 14px;
    align-items: stretch;
}

.kokomorph-panel {
    display: flex;
    flex-direction: column;
    min-height: 460px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-family: "base_font", system-ui, sans-serif;
}

.kokomorph-panel-heading {
    color: var(--text);
    font-size: 1.08rem;
}

.kokomorph-helptext,
.kokomorph-label,
.kokomorph-time,
.kokomorph-audio-placeholder {
    color: var(--muted);
    font-family: "base_font", system-ui, sans-serif;
}

.kokomorph-helptext {
    margin-top: 8px;
    line-height: 1.45;
    font-size: 0.9rem;
}

.kokomorph-label {
    font-size: 0.86rem;
}

.kokomorph-textarea {
    flex: 1;
    width: 100%;
    min-height: 250px;
    margin-top: 14px;
    resize: vertical;
    box-sizing: border-box;
    line-height: 1.55;
}

.kokomorph-field {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.kokomorph-select,
.kokomorph-mode-select {
    width: min(380px, 100%);
}

.kokomorph-blend-controls {
    display: none;
    margin-top: 14px;
}

.kokomorph-blend-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.kokomorph-blend-row input[type="range"] {
    width: min(280px, 100%);
}

.kokomorph-generate-row {
    margin-top: 16px;
    margin-bottom: 18px;
}

.kokomorph-generate-row .textbtn200 {
    width: auto;
    min-width: 190px;
    border-radius: var(--radius);
}

.kokomorph-audio-heading {
    margin-top: auto;
}

.kokomorph-audio-panel {
    min-height: 150px;
    margin-top: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--client);
    box-sizing: border-box;
}

.kokomorph-audio-output {
    display: none;
    width: 100%;
}

.kokomorph-audio-controls {
    display: none;
    width: 100%;
}

.kokomorph-time {
    display: inline-block;
    min-width: 48px;
    padding: 5px;
}

.kokomorph-save-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.kokomorph-audio-placeholder {
    margin-top: 34px;
}

.progressthin {
    color: #12191f;
    background-color: var(--ctrlitem);
    font-family: "base_font", system-ui, sans-serif;
    font-size: 13px;
    height: 15px;
    width: 0%;
    text-align: center;
    border-radius: 6px;
    padding-top: 2px;
    white-space: nowrap;
    transition: width 0.15s ease-out;
}

@media (max-width: 860px) {
    .kokomorph-shell {
        width: calc(100% - 18px);
        margin-top: 12px;
    }

    .kokomorph-appbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .kokomorph-status {
        width: 100%;
    }

    .kokomorph-workspace {
        grid-template-columns: 1fr;
    }

    .kokomorph-panel {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .kokomorph-blend-row,
    .kokomorph-save-row {
        align-items: stretch;
        flex-direction: column;
    }
}
