.image-playground-view .dashboard-topbar {
    margin-bottom: 24px;
}

.image-playground-layout {
    display: grid;
    grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
    align-items: start;
    gap: 18px;
}

.image-playground-panel {
    min-width: 0;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 15px;
    padding: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), #101311;
}

.image-playground-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.image-playground-eyebrow {
    color: #58dcaa;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
}

.image-playground-panel-heading h2 {
    margin: 5px 0 0;
    color: #f2f5f3;
    font-size: 18px;
    letter-spacing: -.025em;
}

.image-playground-field {
    display: grid;
    min-width: 0;
    gap: 8px;
    margin-bottom: 18px;
    color: #cbd2ce;
    font-size: 11px;
    font-weight: 700;
}

.image-playground-field select,
.image-playground-field input,
.image-playground-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 9px;
    padding: 11px 12px;
    outline: 0;
    background: #0c0f0d;
    color: #f4f7f5;
    color-scheme: dark;
    font: inherit;
    font-size: 13px;
    font-weight: 450;
}

.image-playground-field select,
.image-playground-field input {
    min-height: 43px;
}

.image-playground-field textarea {
    min-height: 236px;
    resize: vertical;
    line-height: 1.65;
}

.image-playground-field textarea::placeholder {
    color: #626b66;
}

.image-playground-field textarea[readonly] {
    min-height: 5rem;
    background: rgba(24, 31, 45, .52);
    color: #c6ccda;
}

.image-playground-advanced {
    margin: 1rem 0;
    border: 1px solid rgba(142, 156, 184, .2);
    border-radius: 12px;
    padding: .75rem 1rem;
}

.image-playground-advanced summary {
    cursor: pointer;
    color: #d8deea;
    font-weight: 650;
}

.image-playground-option-group {
    padding-top: 1rem;
}

.image-playground-billing-note {
    color: #a7afbe;
    font-size: .8rem;
    line-height: 1.55;
}

.image-playground-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1rem;
}

.image-playground-result-actions a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.image-playground-field select:focus,
.image-playground-field input:focus,
.image-playground-field textarea:focus {
    border-color: #24b981;
    box-shadow: 0 0 0 3px rgba(36,185,129,.1);
}

.image-playground-field [aria-invalid="true"] {
    border-color: #e27575;
}

.image-playground-field small {
    color: #707a74;
    font-size: 10px;
    font-weight: 450;
}

.image-playground-field-row {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 12px;
}

.image-playground-generate,
.image-playground-again {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(36,185,129,.48);
    border-radius: 9px;
    padding: 0 18px;
    background: linear-gradient(135deg, #13845e, #0f684b);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    transition: filter .2s, opacity .2s;
}

.image-playground-generate {
    width: 100%;
}

.image-playground-generate:hover:not(:disabled),
.image-playground-again:hover:not(:disabled) {
    filter: brightness(1.12);
}

.image-playground-generate:disabled,
.image-playground-again:disabled {
    cursor: wait;
    opacity: .58;
}

.image-playground-validation,
.image-playground-error {
    border: 1px solid rgba(226,117,117,.38);
    border-radius: 9px;
    padding: 11px 12px;
    background: rgba(105,29,29,.16);
    color: #ffb2b2;
    font-size: 11px;
    line-height: 1.6;
}

.image-playground-validation {
    margin: -3px 0 14px;
}

.image-playground-error {
    margin-top: 14px;
}

.image-playground-error strong {
    display: block;
    font-size: 12px;
}

.image-playground-error p {
    margin: 6px 0 0;
    color: #dcaaa9;
    overflow-wrap: anywhere;
}

.image-playground-error small {
    display: block;
    margin-top: 7px;
    color: #c28c8b;
}

.image-playground-loading {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    border: 1px solid rgba(36,185,129,.24);
    border-radius: 9px;
    padding: 12px;
    background: rgba(15,125,87,.09);
    color: #c9ded5;
    font-size: 11px;
    line-height: 1.5;
}

.image-playground-loading strong {
    color: #f1f6f3;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.image-playground-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.2);
    border-top-color: #48d29d;
    border-radius: 50%;
    animation: image-playground-spin .8s linear infinite;
}

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

.image-playground-result {
    display: grid;
    align-content: start;
}

.image-playground-placeholder,
.image-playground-image-frame {
    display: grid;
    min-height: 470px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed rgba(255,255,255,.13);
    border-radius: 11px;
    background:
        linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
        linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
        #0c0f0d;
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
}

.image-playground-placeholder {
    align-content: center;
    gap: 10px;
    color: #78827c;
    text-align: center;
}

.image-playground-placeholder p {
    margin: 0;
    font-size: 12px;
}

.image-playground-placeholder-mark {
    color: #51cd9b;
    font-size: 35px;
    line-height: 1;
    opacity: .62;
}

.image-playground-figure {
    min-width: 0;
    margin: 0;
}

.image-playground-image-frame {
    min-height: 300px;
    border-style: solid;
}

.image-playground-image-frame img {
    display: block;
    max-width: 100%;
    max-height: min(68vh, 720px);
    object-fit: contain;
}

.image-playground-metadata {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 15px 0 0;
}

.image-playground-metadata div {
    min-width: 0;
}

.image-playground-metadata dt {
    margin-bottom: 4px;
    color: #707a74;
    font-size: 9px;
}

.image-playground-metadata dd {
    margin: 0;
    color: #cbd2ce;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.image-playground-again {
    justify-self: end;
    margin-top: 17px;
    background: rgba(15,125,87,.12);
}

@media (max-width: 1000px) {
    .image-playground-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .image-playground-placeholder {
        min-height: 360px;
    }
}

@media (max-width: 540px) {
    .image-playground-panel {
        padding: 16px;
    }

    .image-playground-field-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .image-playground-field textarea {
        min-height: 200px;
    }

    .image-playground-placeholder,
    .image-playground-image-frame {
        min-height: 270px;
    }

    .image-playground-metadata {
        gap: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .image-playground-spinner {
        animation-duration: 1.6s;
    }
}
