*{box-sizing:border-box}

html,body{
    margin:0;
    width:100%;
    height:100%;
    overflow:hidden;
}

body{
    position:relative;
    display:flex;
    flex-direction:column;
    background:#101216;
    color:#eee;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.top{
    flex:0 0 56px;
    height:56px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 20px;
    background:#181b21;
    border-bottom:1px solid #2b2f36;
}

.top a{color:#aaa;text-decoration:none}
.top a:hover{color:#fff}

.app{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    padding:18px 20px 0;
    overflow:hidden;
    height:calc(100% - 296px);
}

.hero{flex:0 0 auto;margin:0 0 12px}
.hero h1{margin:0;font-size:clamp(1.45rem,2.5vw,2.2rem);line-height:1.15}

.workspace{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    padding:0 2px 16px;
}

.descriptor-area{width:100%}
.descriptor-area h2{margin:0 0 14px;font-size:1.1rem}
.superior{margin:18px 0 0}
.superior:first-child{margin-top:0}

.superior h3{
    margin:0 0 8px;
    font-size:1.05rem;
    color: #B8C4D6;
}


details{margin:8px 0}

summary{
    cursor:pointer;
    padding:6px 4px;
    font-weight:600;
    color: #9FAEC2;
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:10px;
}

.descriptor{
    min-height:54px;
    height:54px;
    text-align:left;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:2px;
    padding:7px 12px;
    border:1px solid #343942;
    border-radius:12px;
    background:#1b1f26;
    color:#eee;
    cursor:pointer;
}
.descriptor:hover{border-color:#666}
.descriptor.selected{border-color:#fff;background:#272c35}
.visual-placeholder{font-size:20px;color:#aaa;line-height:1}
.descriptor b{font-size:.88rem;line-height:1.1}

.bottom-panels{
    flex:0 0 240px;
    height:240px;
    min-height:240px;
    display:grid;
    grid-template-columns:40% 60%;
    width:100%;
    overflow:hidden;
}

.prompt-panel{
    position:relative;
    width:100%;
    height:240px;
    min-width:0;
    min-height:240px;
    background:#15181d;
    border-top:1px solid #333;
    border-right:1px solid #333;
    padding:12px 12px 10px 20px;
    overflow:hidden;
}
.prompt-panel h2{margin:0 0 7px;font-size:1.15rem}
#selected{min-height:0;max-height:30px;overflow:hidden;margin-bottom:6px}
.tag{display:inline-block;border:1px solid #444;border-radius:999px;padding:3px 8px;margin:0 4px 3px 0;color:#ccc;font-size:.72rem}

.prompt-panel textarea{
    display:block;
    width:100%;
    height:108px;
    min-height:108px;
    resize:none;
    background:#0d0f12;
    color:#ddd;
    border:1px solid #333;
    border-radius:10px;
    padding:12px;
    font:12px/1.45 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
}
.prompt-actions{display:flex;gap:8px;margin-top:7px;height:38px}
.prompt-panel button{height:38px;margin:0;padding:8px 14px;border:1px solid #343942;border-radius:12px;background:#1b1f26;color:#eee;cursor:pointer}
.prompt-panel button:hover{border-color:#777}

.music{
    position:relative;
    width:100%;
    height:240px;
    min-width:0;
    min-height:240px;
    background:#171a20;
    border-top:1px solid #333;
    padding:12px 16px;
    overflow:hidden;
}
.music-title{display:flex;align-items:center;gap:18px;margin-bottom:10px}
.music-title span{color:#999}
.songs{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;height:calc(240px - 58px)}
.song{min-width:150px;color:#eee;text-decoration:none}
.song img{display:block;width:150px;height:calc(min(240px - 82px,120px));min-height:60px;object-fit:cover;border-radius:10px;background:#292d34}
.song b{display:block;padding-top:6px}

.modal{display:none;position:fixed;inset:0;z-index:50;background:#000b;align-items:center;justify-content:center;padding:20px}
.modal.open{display:flex}
.modal-box{width:min(600px,100%);max-height:90vh;overflow:auto;background:#1b1f25;padding:22px;border-radius:14px}
.modal-box h2{margin-top:0}
.modal-box textarea{width:100%;height:120px;margin:10px 0;background:#111;color:#fff;border:1px solid #444;border-radius:8px;padding:10px}
.modal-box button{margin-right:8px;padding:9px 14px;border:1px solid #444;border-radius:10px;background:#1b1f26;color:#eee}

@media(max-width:700px){
    .top{padding:0 14px}
    .app{
        padding:12px 14px 0;
        height:calc(100% - 276px);
    }
    .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
    .descriptor{min-height:54px;height:54px;padding:7px 11px}
    .bottom-panels{
        flex-basis:220px;
        height:220px;
        min-height:220px;
    }
    .prompt-panel{
        width:100%;
        height:220px;
        min-height:220px;
        padding:10px 10px 8px 14px;
    }
    .prompt-panel textarea{height:108px;min-height:108px}
    .music{
        width:100%;
        height:220px;
        min-height:220px;
        padding:10px 12px;
    }
    .music-title{display:block;margin-bottom:8px}
    .music-title b,.music-title span{font-size:.86rem}
    .songs{gap:10px;height:calc(220px - 50px)}
    .song{min-width:120px}
    .song img{width:120px;height:72px;min-height:0}
}

@media(max-width:420px){.cards{grid-template-columns:1fr}}
